예제 #1
0
        internal override CollationSequence GetCollationSequence(SqliteFunction func, IntPtr context)
        {
#if !SQLITE_STANDARD
            CollationSequence seq = new CollationSequence();
            int    len;
            int    type;
            int    enc;
            IntPtr p = UnsafeNativeMethods.sqlite3_context_collseq(context, out type, out enc, out len);

            if (p != null)
            {
                seq.Name = UTF8ToString(p, len);
            }
            seq.Type     = (CollationTypeEnum)type;
            seq._func    = func;
            seq.Encoding = (CollationEncodingEnum)enc;

            return(seq);
#else
            throw new NotImplementedException();
#endif
        }
예제 #2
0
파일: SQLite3.cs 프로젝트: GirlD/mono
    internal override CollationSequence GetCollationSequence(SqliteFunction func, IntPtr context)
    {
#if !SQLITE_STANDARD
      CollationSequence seq = new CollationSequence();
      int len;
      int type;
      int enc;
      IntPtr p = UnsafeNativeMethods.sqlite3_context_collseq(context, out type, out enc, out len);

      if (p != null) seq.Name = UTF8ToString(p, len);
      seq.Type = (CollationTypeEnum)type;
      seq._func = func;
      seq.Encoding = (CollationEncodingEnum)enc;

      return seq;
#else
      throw new NotImplementedException();
#endif
    }