Dev - SQL generation from EE

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Dev - SQL generation from EE

Oleg Kozyrev Jr.
Hello all,

Is there any way to generate SQL code from Entity Engine? For example, can I get SQL code which creates tables, relationships, inserts data for Party?

Thanks,

Oleg.

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - SQL generation from EE

BJ Freeman
The Entity engine takes XML files that have the Entity definitions, and
creates the table, relationships.
you create xML files that have the data for inserts.

if you look in the webtools you will see how to create XML files from
the database.

Oleg Kozyrev Jr. sent the following on 2/27/06 5:12 AM:

> Hello all,
>
> Is there any way to generate SQL code from Entity Engine? For example, can I get SQL code which creates tables, relationships, inserts data for Party?
>
> Thanks,
>
> Oleg.
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - SQL generation from EE

Oleg Kozyrev Jr.
This is a bit another thing.
What i really need is something like this:
#####################
#!/bin/sh

# Properties
HM='-Dderby.system.home=data/derby'
PR='-Dij.protocol=jdbc:derby:'
DB='-Dij.database=ofbiz;create=true'
EE='framework/entity/lib/jdbc'
CP="-cp $EE/derby.jar:$EE/derbytools.jar"

# Command
OPTIONS="$CP $HM $PR $DB"
CLASS="org.apache.derby.tools.dblook"
JAVA="java"

$JAVA $OPTIONS $CLASS -d jdbc:derby:ofbiz
#########################################

This will create statements for tables, indexes, relations, etc only in Derby.
But I was wondering wether there is a tool to make this independently from the particular DB.

Oleg.


-----Original Message-----
From: BJ Freeman <[hidden email]>
To: OFBiz Project Development Discussion <[hidden email]>
Date: Mon, 27 Feb 2006 06:44:52 -0800
Subject: Re: [OFBiz] Dev - SQL generation from EE

>
> The Entity engine takes XML files that have the Entity definitions, and
> creates the table, relationships.
> you create xML files that have the data for inserts.
>
> if you look in the webtools you will see how to create XML files from
> the database.
>
> Oleg Kozyrev Jr. sent the following on 2/27/06 5:12 AM:
> > Hello all,
> >
> > Is there any way to generate SQL code from Entity Engine? For example, can I get SQL code which creates tables, relationships, inserts data for Party?
> >
> > Thanks,
> >
> > Oleg.
> >
> >  
> > _______________________________________________
> > Dev mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/dev
> >
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>


Ты переживаешь, не зная, как сказать, что любишь?! Просто отправь на номер
8881 sms с текстом AMORE пробел ИмяЛюбимогоЧеловека!
http://r.mail.ru/cln2899/fun.mobile.mail.ru/amore.html 

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - SQL generation from EE

BJ Freeman
I think you find your answer, or close to it in the webtools.

Oleg Kozyrev Jr. sent the following on 2/27/06 6:55 AM:

> This is a bit another thing.
> What i really need is something like this:
> #####################
> #!/bin/sh
>
> # Properties
> HM='-Dderby.system.home=data/derby'
> PR='-Dij.protocol=jdbc:derby:'
> DB='-Dij.database=ofbiz;create=true'
> EE='framework/entity/lib/jdbc'
> CP="-cp $EE/derby.jar:$EE/derbytools.jar"
>
> # Command
> OPTIONS="$CP $HM $PR $DB"
> CLASS="org.apache.derby.tools.dblook"
> JAVA="java"
>
> $JAVA $OPTIONS $CLASS -d jdbc:derby:ofbiz
> #########################################
>
> This will create statements for tables, indexes, relations, etc only in Derby.
> But I was wondering wether there is a tool to make this independently from the particular DB.
>
> Oleg.
>
>
> -----Original Message-----
> From: BJ Freeman <[hidden email]>
> To: OFBiz Project Development Discussion <[hidden email]>
> Date: Mon, 27 Feb 2006 06:44:52 -0800
> Subject: Re: [OFBiz] Dev - SQL generation from EE
>
>
>>The Entity engine takes XML files that have the Entity definitions, and
>>creates the table, relationships.
>>you create xML files that have the data for inserts.
>>
>>if you look in the webtools you will see how to create XML files from
>>the database.
>>
>>Oleg Kozyrev Jr. sent the following on 2/27/06 5:12 AM:
>>
>>>Hello all,
>>>
>>>Is there any way to generate SQL code from Entity Engine? For example, can I get SQL code which creates tables, relationships, inserts data for Party?
>>>
>>>Thanks,
>>>
>>>Oleg.
>>>
>>>
>>>_______________________________________________
>>>Dev mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/dev
>>>
>>
>>
>>_______________________________________________
>>Dev mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/dev
>>
>
>
>
> Ты переживаешь, не зная, как сказать, что любишь?! Просто отправь на номер
> 8881 sms с текстом AMORE пробел ИмяЛюбимогоЧеловека!
> http://r.mail.ru/cln2899/fun.mobile.mail.ru/amore.html 
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - SQL generation from EE

David E. Jones
In reply to this post by Oleg Kozyrev Jr.

Oleg,

I'm not sure if I understand what you are asking, but creating create  
and such statements that are DB independent is almost impossible  
unless you limit yourself to a feature set that is a pretty small sub-
set of the potential for SQL (and much less even than what OFBiz  
uses). So no, there isn't really any way to do this. The EE needs  
information about the database to know the syntax to use in the SQL  
it generates.

-David


On Feb 27, 2006, at 7:55 AM, Oleg Kozyrev Jr. wrote:

> This is a bit another thing.
> What i really need is something like this:
> #####################
> #!/bin/sh
>
> # Properties
> HM='-Dderby.system.home=data/derby'
> PR='-Dij.protocol=jdbc:derby:'
> DB='-Dij.database=ofbiz;create=true'
> EE='framework/entity/lib/jdbc'
> CP="-cp $EE/derby.jar:$EE/derbytools.jar"
>
> # Command
> OPTIONS="$CP $HM $PR $DB"
> CLASS="org.apache.derby.tools.dblook"
> JAVA="java"
>
> $JAVA $OPTIONS $CLASS -d jdbc:derby:ofbiz
> #########################################
>
> This will create statements for tables, indexes, relations, etc  
> only in Derby.
> But I was wondering wether there is a tool to make this  
> independently from the particular DB.
>
> Oleg.
>
>
> -----Original Message-----
> From: BJ Freeman <[hidden email]>
> To: OFBiz Project Development Discussion <[hidden email]>
> Date: Mon, 27 Feb 2006 06:44:52 -0800
> Subject: Re: [OFBiz] Dev - SQL generation from EE
>
>>
>> The Entity engine takes XML files that have the Entity  
>> definitions, and
>> creates the table, relationships.
>> you create xML files that have the data for inserts.
>>
>> if you look in the webtools you will see how to create XML files from
>> the database.
>>
>> Oleg Kozyrev Jr. sent the following on 2/27/06 5:12 AM:
>>> Hello all,
>>>
>>> Is there any way to generate SQL code from Entity Engine? For  
>>> example, can I get SQL code which creates tables, relationships,  
>>> inserts data for Party?
>>>
>>> Thanks,
>>>
>>> Oleg.
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>>
>>
>> _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/dev
>>
>
>
> Ты переживаешь, не зная, как сказать,  
> что любишь?! Просто отправь на номер
> 8881 sms с текстом AMORE пробел  
> ИмяЛюбимогоЧеловека!
> http://r.mail.ru/cln2899/fun.mobile.mail.ru/amore.html
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dev - SQL generation from EE

Oleg Kozyrev Jr.
Thanks,

Oleg.

-----Original Message-----
From: "David E. Jones" <[hidden email]>
To: OFBiz Project Development Discussion <[hidden email]>
Date: Mon, 27 Feb 2006 08:32:21 -0700
Subject: Re: [OFBiz] Dev - SQL generation from EE

>
> Oleg,
>
> I'm not sure if I understand what you are asking, but creating create  
> and such statements that are DB independent is almost impossible  
> unless you limit yourself to a feature set that is a pretty small sub-
> set of the potential for SQL (and much less even than what OFBiz  
> uses). So no, there isn't really any way to do this. The EE needs  
> information about the database to know the syntax to use in the SQL  
> it generates.
>
> -David
>
>
> On Feb 27, 2006, at 7:55 AM, Oleg Kozyrev Jr. wrote:
>
> > This is a bit another thing.
> > What i really need is something like this:
> > #####################
> > #!/bin/sh
> >
> > # Properties
> > HM='-Dderby.system.home=data/derby'
> > PR='-Dij.protocol=jdbc:derby:'
> > DB='-Dij.database=ofbiz;create=true'
> > EE='framework/entity/lib/jdbc'
> > CP="-cp $EE/derby.jar:$EE/derbytools.jar"
> >
> > # Command
> > OPTIONS="$CP $HM $PR $DB"
> > CLASS="org.apache.derby.tools.dblook"
> > JAVA="java"
> >
> > $JAVA $OPTIONS $CLASS -d jdbc:derby:ofbiz
> > #########################################
> >
> > This will create statements for tables, indexes, relations, etc  
> > only in Derby.
> > But I was wondering wether there is a tool to make this  
> > independently from the particular DB.
> >
> > Oleg.
> >
> >
> > -----Original Message-----
> > From: BJ Freeman <[hidden email]>
> > To: OFBiz Project Development Discussion <[hidden email]>
> > Date: Mon, 27 Feb 2006 06:44:52 -0800
> > Subject: Re: [OFBiz] Dev - SQL generation from EE
> >
> >>
> >> The Entity engine takes XML files that have the Entity  
> >> definitions, and
> >> creates the table, relationships.
> >> you create xML files that have the data for inserts.
> >>
> >> if you look in the webtools you will see how to create XML files from
> >> the database.
> >>
> >> Oleg Kozyrev Jr. sent the following on 2/27/06 5:12 AM:
> >>> Hello all,
> >>>
> >>> Is there any way to generate SQL code from Entity Engine? For  
> >>> example, can I get SQL code which creates tables, relationships,  
> >>> inserts data for Party?
> >>>
> >>> Thanks,
> >>>
> >>> Oleg.
> >>>
> >>>
> >>> _______________________________________________
> >>> Dev mailing list
> >>> [hidden email]
> >>> http://lists.ofbiz.org/mailman/listinfo/dev
> >>>
> >>
> >> _______________________________________________
> >> Dev mailing list
> >> [hidden email]
> >> http://lists.ofbiz.org/mailman/listinfo/dev
> >>
> >
> >
> > Ты переживаешь, не зная, как сказать,  
> > что любишь?! Просто отправь на номер
> > 8881 sms с текстом AMORE пробел  
> > ИмяЛюбимогоЧеловека!
> > http://r.mail.ru/cln2899/fun.mobile.mail.ru/amore.html
> >
> >
> > _______________________________________________
> > Dev mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/dev
>
>
> ATTACHMENT: application/pkcs7-signature ("smime.p7s")
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>


Хостинг@Mail.ru - надежно, выгодно, удобно!
http://r.mail.ru/cln2729/hosting.mail.ru/

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev