All the interesting code lives in the namespace Community.Data.SQLite
and the public class csSQLite
Which means to access the public api, we write code like the
following:
using Community.Data.SQLite;
...
return csSQLite.sqlite3_libversion();
...
Is there a better public class name?
Other suggestions are welcome.
Noah
I think Community.Data.SQLite.Managed is an appropriate name, to
distinguish it from other implementations of Community.Data.SQLite
(like the one that talks to the native library).
-kg
return csSQLite.sqlite3_libversion();
...
Is there a better public class name?
I would not rename sqlite3_xxx() functions because you need a way to
map to the original sqlite c library. When a new version comes out of
the sqlite c library, can you easily incorporate those changes in your
C# version?
Otherwise, if you do rename the functions, then I would create a text
document which map the friendly C# functions to the C functions.
Personally, I think there should be at least 2 wrapper APIs of csharp-
sqlite.
1. a non-ADO.NET wrapper that does not depend on System.Data. Make
this API easy to use.
Maybe, it could even work like the ADO.NET wrapper.
2. an ADO.NET wrapper that depends on System.Data
1) Change source code tree to Community.Data.CSharpSqlite
2) Change namespace to Community.Data.CSharpSqlite
3) Change class name from csSQLite to SQLite3
4) add alias functions for all the sqlite3_api functions to allow
SQLite3.api type calls
I don't really like the Data. part of the namespace, but don't really
see any harm in leaving it in place.
As always, your feedback is welcome
Noah
1) Change source code tree to Community.Data.CSharpSqlite
2) Change namespace to Community.Data.CSharpSqlite
3) Change class name from csSQLite to SQLite3
4) add alias functions for all the sqlite3_api functions to allow SQLite3.api type calls
I don't really like the Data. part of the namespace, but don't really see any harm in leaving it in place.
I think that API should be exactly the same as in native version.
Otherwise you can't use native SQLite docs.
Namespace looks better as Community.CsharpSqlite because it has NO
correlation to System.Data namespace at all and it follows guidelines
on namespace namings.
IMHO ADO.NET wrapper should really be based on System.Data.Sqlite code
from http://sqlite.phxsoftware.com/. It's not hard to add support
there and it's mature enough. Btw - it's also good idea to help Robert
in updating and improving ADO.NET wrapper instead of doing own one.
Max.
On 18 фев, 14:53, Kosenko Max <kosenko....@gmail.com> wrote:
> IMHO ADO.NET wrapper should really be based on System.Data.Sqlite code
> fromhttp://sqlite.phxsoftware.com/. It's not hard to add support