Bill,
I think so.
I think all of these issues with datasource specific configuration are all
related. I think we need to change the type-mapping section of the xml file
to something like <datasource-config> (best name I can think of), with
subsections for function mapping, type mappings, join style (maybe), and
general information like select-for-update support and syntax.
Any ideas on the layout of this xml?
We also have the option of doing the conversion in the connector layer and
always using the {...} sql extension format.
-dain
----- Original Message -----
From: "Bill Burke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 9:12 AM
Subject: RE: [JBoss-dev] SQL function mapping
> Dain,
>
> Can we expand this to CMP 1.x and for "select-for-update"?
>
> Thanks,
>
> Bill
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Dave
> > Smith
> > Sent: Monday, August 20, 2001 7:49 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JBoss-dev] SQL function mapping
> >
> >
> >
> >
> > Dain
> > > I added the function mapping code to the EJB-QL to SQL
> > translation engine. I
> > > added mappings for MS SQLServer, Oracle, MySQL and PostgreSQL to the
> > > standard jboss cmp xmp file.
> > >
> > > Notes:
> > > - These mappings are completely based on info from the 'SQL in
> > a Nutshell'
> > > book, so they may not work (I don't use any of these databases).
> > > - PostgreSQL doesn't have a three argument position function,
> > so I didn't
> >
> > It is simply two functions
> >
> > position(?2 in substring(?1 from ?3))+?3
> >
> >
> >
> > > map it.
> > > - Send me any corrections or change it your self.
> > > - If not mapping is provided the system defaults to {fn concat(param1,
> > > param2)} style functions.
> > >
> > > The mappings follow this message.
> > >
> > > -dain
> > >
> > >
> > > Oracle:
> > > <function-mapping>
> > > <function-name>concat</function-name>
> > > <function-sql>(?1 || ?2)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>substring</function-name>
> > > <function-sql>substr(?1, ?2, ?3)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>length</function-name>
> > > <function-sql>len(?1)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>locate</function-name>
> > > <function-sql>instr(?1, ?2, ?3)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>abs</function-name>
> > > <function-sql>abs(?1)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>sqrt</function-name>
> > > <function-sql>sqrt(?1)</function-sql>
> > > </function-mapping>
> > >
> > >
> > > MS SQLServer:
> > > <function-mapping>
> > > <function-name>concat</function-name>
> > > <function-sql>(?1 + ?2)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>substring</function-name>
> > > <function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>length</function-name>
> > > <function-sql>len(?1)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>locate</function-name>
> > > <function-sql>charindex(?1, ?2, ?3)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>abs</function-name>
> > > <function-sql>abs(?1)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>sqrt</function-name>
> > > <function-sql>sqrt(?1)</function-sql>
> > > </function-mapping>
> > >
> > > MySQL:
> > > <function-mapping>
> > > <function-name>concat</function-name>
> > > <function-sql>concat(?1, ?2)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>substring</function-name>
> > > <function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>length</function-name>
> > > <function-sql>length(?1)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>locate</function-name>
> > > <function-sql>locate(?1, ?2, ?3)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>abs</function-name>
> > > <function-sql>abs(?1)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>sqrt</function-name>
> > > <function-sql>sqrt(?1)</function-sql>
> > > </function-mapping>
> > >
> > > PostgreSQL:
> > > <function-mapping>
> > > <function-name>concat</function-name>
> > > <function-sql>(?1 || ?2)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>substring</function-name>
> > > <function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>length</function-name>
> > > <function-sql>length(?1)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>abs</function-name>
> > > <function-sql>abs(?1)</function-sql>
> > > </function-mapping>
> > > <function-mapping>
> > > <function-name>sqrt</function-name>
> > > <function-sql>sqrt(?1)</function-sql>
> > > </function-mapping>
> > >
> > >
> > >
> > > _______________________________________________
> > > Jboss-development mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-development
> > >
> > >
> >
> >
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
> >
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development