diff options
author | adam <adamansky@gmail.com> | 2013-08-15 22:05:19 +0700 |
---|---|---|
committer | adam <adamansky@gmail.com> | 2013-08-15 22:05:19 +0700 |
commit | b4766cf74b719e34b7f85c430f95062dabfa4611 (patch) | |
tree | d5f28a80da0ee1e6c8f07cd05e1909f83766cfed /nejdb/Ejdb.DB | |
parent | 721691e20a05e34922a8d40909d162a9bf94a59b (diff) | |
download | ejdb-b4766cf74b719e34b7f85c430f95062dabfa4611.tar.gz ejdb-b4766cf74b719e34b7f85c430f95062dabfa4611.tar.bz2 ejdb-b4766cf74b719e34b7f85c430f95062dabfa4611.zip |
#92
Diffstat (limited to 'nejdb/Ejdb.DB')
-rw-r--r-- | nejdb/Ejdb.DB/EJDB.cs | 52 | ||||
-rw-r--r-- | nejdb/Ejdb.DB/EJDBQCursor.cs | 4 | ||||
-rw-r--r-- | nejdb/Ejdb.DB/EJDBQuery.cs | 18 |
3 files changed, 37 insertions, 37 deletions
diff --git a/nejdb/Ejdb.DB/EJDB.cs b/nejdb/Ejdb.DB/EJDB.cs index 01b1253..c19a6c7 100644 --- a/nejdb/Ejdb.DB/EJDB.cs +++ b/nejdb/Ejdb.DB/EJDB.cs @@ -153,13 +153,13 @@ namespace Ejdb.DB { // Native functions refs //.////////////////////////////////////////////////////////////////// #region NativeRefs - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbnew")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbnew", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbnew(); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbdel")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbdel", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbdel([In] IntPtr db); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbopen")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbopen", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbopen([In] IntPtr db, [In] IntPtr path, int mode); internal static bool _ejdbopen(IntPtr db, string path, int mode) { @@ -171,19 +171,19 @@ namespace Ejdb.DB { } } - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbclose")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbclose", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbclose([In] IntPtr db); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbisopen")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbisopen", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbisopen([In] IntPtr db); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbecode")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbecode", CallingConvention = CallingConvention.Cdecl)] internal static extern int _ejdbecode([In] IntPtr db); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdberrmsg")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdberrmsg", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdberrmsg(int ecode); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbgetcoll")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbgetcoll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbgetcoll([In] IntPtr db, [In] IntPtr cname); internal static IntPtr _ejdbgetcoll(IntPtr db, string cname) { @@ -195,10 +195,10 @@ namespace Ejdb.DB { } } - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbcreatecoll")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbcreatecoll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbcreatecoll([In] IntPtr db, [In] IntPtr cname, IntPtr opts); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbcreatecoll")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbcreatecoll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbcreatecoll([In] IntPtr db, [In] IntPtr cname, ref EJDBCollectionOptionsN opts); internal static IntPtr _ejdbcreatecoll(IntPtr db, String cname, EJDBCollectionOptionsN? opts) { @@ -215,7 +215,7 @@ namespace Ejdb.DB { } } //EJDB_EXPORT bool ejdbrmcoll(EJDB *jb, const char *colname, bool unlinkfile); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbrmcoll")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbrmcoll", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbrmcoll([In] IntPtr db, [In] IntPtr cname, bool unlink); internal static bool _ejdbrmcoll(IntPtr db, string cname, bool unlink) { @@ -227,49 +227,49 @@ namespace Ejdb.DB { } } //EJDB_EXPORT bson* ejdbcommand(EJDB *jb, bson *cmd); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbcommand2")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbcommand2", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbcommand([In] IntPtr db, [In] byte[] cmd); //EJDB_EXPORT bool ejdbsavebson3(EJCOLL *jcoll, void *bsdata, bson_oid_t *oid, bool merge); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbsavebson3")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbsavebson3", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbsavebson([In] IntPtr coll, [In] byte[] bsdata, [Out] byte[] oid, [In] bool merge); //EJDB_EXPORT bson* ejdbloadbson(EJCOLL *coll, const bson_oid_t *oid); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbloadbson")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbloadbson", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbloadbson([In] IntPtr coll, [In] byte[] oid); //EJDB_EXPORT const char* bson_data2(const bson *b, int *bsize); - [DllImport(EJDB_LIB_NAME, EntryPoint="bson_data2")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "bson_data2", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _bson_data2([In] IntPtr bsptr, out int size); //EJDB_EXPORT void bson_del(bson *b); - [DllImport(EJDB_LIB_NAME, EntryPoint="bson_del")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "bson_del", CallingConvention = CallingConvention.Cdecl)] internal static extern void _bson_del([In] IntPtr bsptr); //EJDB_EXPORT bool ejdbrmbson(EJCOLL *coll, bson_oid_t *oid); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbrmbson")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbrmbson", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbrmbson([In] IntPtr cptr, [In] byte[] oid); //EJDB_EXPORT bool ejdbsyncdb(EJDB *jb) - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbsyncdb")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbsyncdb", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbsyncdb([In] IntPtr db); //EJDB_EXPORT bool ejdbsyncoll(EJDB *jb) - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbsyncoll")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbsyncoll", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbsyncoll([In] IntPtr coll); //EJDB_EXPORT bool ejdbsetindex(EJCOLL *coll, const char *ipath, int flags); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbsetindex")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbsetindex", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbsetindex([In] IntPtr coll, [In] IntPtr ipathptr, int flags); //EJDB_EXPORT bson* ejdbmeta(EJDB *jb) - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbmeta")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbmeta", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbmeta([In] IntPtr db); //EJDB_EXPORT bool ejdbtranbegin(EJCOLL *coll); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbtranbegin")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbtranbegin", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbtranbegin([In] IntPtr coll); //EJDB_EXPORT bool ejdbtrancommit(EJCOLL *coll); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbtrancommit")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbtrancommit", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbtrancommit([In] IntPtr coll); //EJDB_EXPORT bool ejdbtranabort(EJCOLL *coll); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbtranabort")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbtranabort", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbtranabort([In] IntPtr coll); //EJDB_EXPORT bool ejdbtranstatus(EJCOLL *jcoll, bool *txactive); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbtranstatus")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbtranstatus", CallingConvention = CallingConvention.Cdecl)] internal static extern bool _ejdbtranstatus([In] IntPtr coll, out bool txactive); //EJDB_EXPORT const char *ejdbversion(); - [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbversion")] + [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbversion", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr _ejdbversion(); internal static bool _ejdbsetindex(IntPtr coll, string ipath, int flags) { diff --git a/nejdb/Ejdb.DB/EJDBQCursor.cs b/nejdb/Ejdb.DB/EJDBQCursor.cs index 3596fe1..e3c83eb 100644 --- a/nejdb/Ejdb.DB/EJDBQCursor.cs +++ b/nejdb/Ejdb.DB/EJDBQCursor.cs @@ -33,10 +33,10 @@ namespace Ejdb.DB { //Pointer to the result set list IntPtr _qresptr; //EJDB_EXPORT void ejdbqresultdispose(EJQRESULT qr); - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqresultdispose")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqresultdispose", CallingConvention = CallingConvention.Cdecl)] static extern void _ejdbqresultdispose([In] IntPtr qres); //const void* ejdbqresultbsondata(EJQRESULT qr, int pos, int *size) - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqresultbsondata")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqresultbsondata", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr _ejdbqresultbsondata([In] IntPtr qres, [In] int pos, out int size); /// <summary> diff --git a/nejdb/Ejdb.DB/EJDBQuery.cs b/nejdb/Ejdb.DB/EJDBQuery.cs index 6a948f8..d6307ff 100644 --- a/nejdb/Ejdb.DB/EJDBQuery.cs +++ b/nejdb/Ejdb.DB/EJDBQuery.cs @@ -70,31 +70,31 @@ namespace Ejdb.DB { // #region NativeRefs //EJDB_EXPORT void ejdbquerydel(EJQ *q); - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbquerydel")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbquerydel", CallingConvention = CallingConvention.Cdecl)] static extern void _ejdbquerydel([In] IntPtr qptr); //EJDB_EXPORT EJQ* ejdbcreatequery2(EJDB *jb, void *qbsdata); - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbcreatequery2")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbcreatequery2", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr _ejdbcreatequery([In] IntPtr jb, [In] byte[] bsdata); //EJDB_EXPORT EJQ* ejdbqueryhints(EJDB *jb, EJQ *q, void *hintsbsdata) - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqueryhints")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqueryhints", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr _ejdbqueryhints([In] IntPtr jb, [In] IntPtr qptr, [In] byte[] bsdata); //EJDB_EXPORT EJQ* ejdbqueryaddor(EJDB *jb, EJQ *q, void *orbsdata) - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqueryaddor")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqueryaddor", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr _ejdbqueryaddor([In] IntPtr jb, [In] IntPtr qptr, [In] byte[] bsdata); //EJDB_EXPORT EJQRESULT ejdbqryexecute(EJCOLL *jcoll, const EJQ *q, uint32_t *count, int qflags, TCXSTR *log) - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqryexecute")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqryexecute", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr _ejdbqryexecute([In] IntPtr jcoll, [In] IntPtr q, out int count, [In] int qflags, [In] IntPtr logxstr); //EJDB_EXPORT TCXSTR *tcxstrnew(void) - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="tcxstrnew")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "tcxstrnew", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr _tcxstrnew(); //EJDB_EXPORT void tcxstrdel(TCXSTR *xstr); - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="tcxstrdel")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "tcxstrdel", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr _tcxstrdel([In] IntPtr strptr); //EJDB_EXPORT int tcxstrsize(const TCXSTR *xstr); - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="tcxstrsize")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "tcxstrsize", CallingConvention = CallingConvention.Cdecl)] static extern int _tcxstrsize([In] IntPtr strptr); //EJDB_EXPORT int tcxstrptr(const TCXSTR *xstr); - [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="tcxstrptr")] + [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "tcxstrptr", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr _tcxstrptr([In] IntPtr strptr); #endregion /// <summary> |