[nem-en] SQL macros (dataSqlClient.n)

Ildar Mulyukov ildar at users.sourceforge.net
Wed Oct 18 10:47:27 CEST 2006


On 18.10.2006 12:47:36, Kamil Skalski wrote:
> Probably it is possible to get some more common code out of Npgsql   
> and  SqlClient macros, but there will always be some provider  
> specific  code, for example mapping of SQL types to .NET types, which  
> is needed  during parameters assignment generation and converting  
> returned  values.  Also, macros must actually run the provider to  
> check the query.
> 
> Probably the best way to see the opportunities and problems in   
> refactoring this code is trying to write macros for some other   
> provider. :)

	Hi, Kamil,
it was nice to receive an answer so soon. Here comes a "1st approach  
patch" for Sqlite backend. You seem to 100% right. Is it possible to  
parametrize macros in some way? Or, probably, it is not needed at all.  
Then there are two ways to support backends:
1. make SqliteConnection() SqliteCommand() and some others from the  
ConfigureConnection macro (in a syntax tree) (weird)
2. make a comprehensive collection of backends inside the  
dataSqlClient.n
What do you think?
Regards, Ildar.
--
Ildar  Mulyukov,
   free SW designer/programmer
================================================
email: ildar at users.sourceforge.net
projects: http://os-development.sourceforge.net/
home: http://tuganger.narod.ru/
ALT Linux Sisyphus
================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dataSqlClient.n.patch
Type: text/x-patch
Size: 5738 bytes
Desc: not available
Url : /mailman/pipermail/devel-en/attachments/20061018/07bc610c/dataSqlClient.n.bin


More information about the devel-en mailing list