sqlite3_create_collation() private method

private sqlite3_create_collation ( IntPtr db, byte strName, int eTextRep, IntPtr ctx, SqliteCollation fcompare ) : int
db System.IntPtr
strName byte
eTextRep int
ctx System.IntPtr
fcompare SqliteCollation
return int
Ejemplo n.º 1
0
        internal override void CreateCollation(string strCollation, SqliteCollation func)
        {
            int n = UnsafeNativeMethods.sqlite3_create_collation(_sql, ToUTF8(strCollation), 1, IntPtr.Zero, func);

            if (n > 0)
            {
                throw new SqliteException(n, SqliteLastError());
            }
        }
Ejemplo n.º 2
0
        internal override void CreateCollation(string strCollation, SQLiteCollation func, SQLiteCollation func16, IntPtr user_data)
        {
            int n = UnsafeNativeMethods.sqlite3_create_collation(_sql, ToUTF8(strCollation), 2, user_data, func16);

            if (n == 0)
            {
                UnsafeNativeMethods.sqlite3_create_collation(_sql, ToUTF8(strCollation), 1, user_data, func);
            }
            if (n > 0)
            {
                throw new SqliteException(n, SQLiteLastError());
            }
        }