当前位置: 首页>>代码示例>>C#>>正文


C# Internal.DB类代码示例

本文整理汇总了C#中BerkeleyDB.Internal.DB的典型用法代码示例。如果您正苦于以下问题:C# DB类的具体用法?C# DB怎么用?C# DB使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DB类属于BerkeleyDB.Internal命名空间,在下文中一共展示了DB类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: associate_foreign

 internal int associate_foreign(DB dbp, BDB_AssociateForeignDelegate callback, uint flags)
 {
     int ret;
     ret = libdb_csharpPINVOKE.DB_associate_foreign(swigCPtr, DB.getCPtr(dbp), callback, flags);
     DatabaseException.ThrowException(ret);
     return ret;
 }
开发者ID:mcandre,项目名称:db,代码行数:7,代码来源:DB.cs

示例2: BaseDatabase

 /// <summary>
 /// Create a new database object with the same underlying DB handle as
 /// <paramref name="clone"/>.  Used during Database.Open to get an
 /// object of the correct DBTYPE.
 /// </summary>
 /// <param name="clone">Database to clone</param>
 protected BaseDatabase(BaseDatabase clone) {
     db = clone.db;
     clone.db = null;
     db.api_internal = this;
     env = clone.env;
     clone.env = null;
 }
开发者ID:gildafnai82,项目名称:craq,代码行数:13,代码来源:BaseDatabase.cs

示例3: associate

 internal int associate(DB_TXN txn, DB sec, BDB_AssociateDelegate callback, uint flags)
 {
     int ret;
     ret = libdb_csharpPINVOKE.DB_associate(swigCPtr, DB_TXN.getCPtr(txn), DB.getCPtr(sec), callback, flags);
     DatabaseException.ThrowException(ret);
     return ret;
 }
开发者ID:mcandre,项目名称:db,代码行数:7,代码来源:DB.cs

示例4: doDupCompare

        private static int doDupCompare(
            IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p, IntPtr locp)
        {
            DB db = new DB(dbp, false);
            DBT dbt1 = new DBT(dbt1p, false);
            DBT dbt2 = new DBT(dbt2p, false);
            if (locp != IntPtr.Zero)
                locp = IntPtr.Zero;

            return ((SecondaryBTreeDatabase)(db.api_internal)).DupCompare(
                DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
        }
开发者ID:hyc,项目名称:BerkeleyDB,代码行数:12,代码来源:SecondaryBTreeDatabase.cs

示例5: doPrefixCompare

 private static uint doPrefixCompare(
     IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2)
 {
     DB db = new DB(dbp, false);
     DBT dbt1 = new DBT(dbtp1, false);
     DBT dbt2 = new DBT(dbtp2, false);
     SecondaryBTreeDatabase tmp =
                     (SecondaryBTreeDatabase)db.api_internal;
     return tmp.prefixCompareHandler(
         DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
 }
开发者ID:hyc,项目名称:BerkeleyDB,代码行数:11,代码来源:SecondaryBTreeDatabase.cs

示例6: doHash

        private static uint doHash(IntPtr dbp, IntPtr datap, uint len)
        {
            DB db = new DB(dbp, false);
            byte[] t_data = new byte[len];
            Marshal.Copy(datap, t_data, 0, (int)len);

            SecondaryHashDatabase tmp = (SecondaryHashDatabase)db.api_internal;
            return tmp.HashFunction(t_data);
        }
开发者ID:hyc,项目名称:BerkeleyDB,代码行数:9,代码来源:SecondaryHashDatabase.cs

示例7: doCompare

 private static int doCompare(IntPtr dbp,
     IntPtr dbtp1, IntPtr dbtp2, IntPtr locp)
 {
     DB db = new DB(dbp, false);
     DBT dbt1 = new DBT(dbtp1, false);
     DBT dbt2 = new DBT(dbtp2, false);
     if (locp != IntPtr.Zero)
         locp = IntPtr.Zero;
     SecondaryBTreeDatabase tmp =
         (SecondaryBTreeDatabase)db.api_internal;
     return tmp.compareHandler(
         DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
 }
开发者ID:hyc,项目名称:BerkeleyDB,代码行数:13,代码来源:SecondaryBTreeDatabase.cs

示例8: doCompare

 private static int doCompare(IntPtr dbp, 
     IntPtr dbtp1, IntPtr dbtp2, IntPtr locp)
 {
     DB db = new DB(dbp, false);
     DBT dbt1 = new DBT(dbtp1, false);
     DBT dbt2 = new DBT(dbtp2, false);
     if (locp != IntPtr.Zero)
         locp = IntPtr.Zero;
     BTreeDatabase btdb = (BTreeDatabase)(db.api_internal);
     return btdb.Compare(
         DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
 }
开发者ID:xiaogao0371,项目名称:dockerfile,代码行数:12,代码来源:BTreeDatabase.cs

示例9: doDupCompare

        private static int doDupCompare(
            IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p)
        {
            DB db = new DB(dbp, false);
            DBT dbt1 = new DBT(dbt1p, false);
            DBT dbt2 = new DBT(dbt2p, false);

            BTreeDatabase btdb = (BTreeDatabase)(db.api_internal);
            return btdb.DupCompare(
                DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
        }
开发者ID:mcandre,项目名称:db,代码行数:11,代码来源:BTreeDatabase.cs

示例10: doDupCompare

        private static int doDupCompare(
            IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p)
        {
            DB db = new DB(dbp, false);
            DBT dbt1 = new DBT(dbt1p, false);
            DBT dbt2 = new DBT(dbt2p, false);

            SecondaryHashDatabase tmp = (SecondaryHashDatabase)db.api_internal;
            return tmp.DupCompare(
                DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
        }
开发者ID:balagopalraj,项目名称:clearlinux,代码行数:11,代码来源:SecondaryHashDatabase.cs

示例11: doNullify

        /// <summary>
        /// Protected method to nullify a foreign key
        /// </summary>
        /// <param name="dbp">Secondary DB Handle</param>
        /// <param name="keyp">Primary Key</param>
        /// <param name="datap">Primary Data</param>
        /// <param name="fkeyp">Foreign Key</param>
        /// <param name="changed">Whether the foreign key has changed</param>
        /// <returns>0 on success, !0 on failure</returns>
        protected static int doNullify(IntPtr dbp,
            IntPtr keyp, IntPtr datap, IntPtr fkeyp, ref int changed) {
            DB db = new DB(dbp, false);
            DBT key = new DBT(keyp, false);
            DBT data = new DBT(datap, false);
            DBT fkey = new DBT(fkeyp, false);

            DatabaseEntry d = ((SecondaryDatabase)db.api_internal).Nullifier(
                DatabaseEntry.fromDBT(key),
                DatabaseEntry.fromDBT(data), DatabaseEntry.fromDBT(fkey));

            if (d == null)
                changed = 0;
            else {
                changed = 1;
                data.data = d.Data;
            }

            return 0;
        }
开发者ID:rohitlodha,项目名称:DenverDB,代码行数:29,代码来源:SecondaryDatabase.cs

示例12: doHash

        private static uint doHash(IntPtr dbp, IntPtr datap, uint len)
        {
            DB db = new DB(dbp, false);
            byte[] t_data = new byte[len];
            Marshal.Copy(datap, t_data, 0, (int)len);

            return ((HashDatabase)(db.api_internal)).hashHandler(t_data);
        }
开发者ID:jamiekeefer,项目名称:gldcoin,代码行数:8,代码来源:HashDatabase.cs

示例13: doFeedback

 private static void doFeedback(IntPtr dbp, int opcode, int percent)
 {
     DB db = new DB(dbp, false);
     db.api_internal.Feedback((DatabaseFeedbackEvent)opcode, percent);
 }
开发者ID:sukantoguha,项目名称:INET-Vagrant-Demos,代码行数:5,代码来源:BaseDatabase.cs

示例14: doCompare

        private static int doCompare(IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2)
        {
            DB db = new DB(dbp, false);
            DBT dbt1 = new DBT(dbtp1, false);
            DBT dbt2 = new DBT(dbtp2, false);

            return ((HashDatabase)(db.api_internal)).compareHandler(
                DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
        }
开发者ID:jamiekeefer,项目名称:gldcoin,代码行数:9,代码来源:HashDatabase.cs

示例15: doAssociate

        /// <summary>
        /// Protected method to call the key generation function.
        /// </summary>
        /// <param name="dbp">Secondary DB Handle</param>
        /// <param name="keyp">Primary Key</param>
        /// <param name="datap">Primary Data</param>
        /// <param name="skeyp">Scondary Key</param>
        /// <returns>0 on success, !0 on failure</returns>
        protected static int doAssociate(
            IntPtr dbp, IntPtr keyp, IntPtr datap, IntPtr skeyp)
        {
            DB db = new DB(dbp, false);
            DBT key = new DBT(keyp, false);
            DBT data = new DBT(datap, false);
            DBT skey = new DBT(skeyp, false);

            DatabaseEntry s =
                ((SecondaryDatabase)db.api_internal).KeyGen(
                DatabaseEntry.fromDBT(key), DatabaseEntry.fromDBT(data));

            if (s == null)
                return DbConstants.DB_DONOTINDEX;

            skey.data = s.Data;
            return 0;
        }
开发者ID:kanbang,项目名称:Colt,代码行数:26,代码来源:SecondaryDatabase.cs


注:本文中的BerkeleyDB.Internal.DB类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。