• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Internal.DB类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: doPartition

 private static uint doPartition(IntPtr dbp, IntPtr dbtp)
 {
     DB db = new DB(dbp, false);
     DatabaseEntry dbt = DatabaseEntry.fromDBT(new DBT(dbtp, false));
     BTreeDatabase btdb = (BTreeDatabase)(db.api_internal);
     return btdb.Partition(dbt);
 }
开发者ID:xiaogao0371,项目名称:dockerfile,代码行数:7,代码来源:BTreeDatabase.cs


示例17: getCPtr

 internal static HandleRef getCPtr(DB obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
开发者ID:mcandre,项目名称:db,代码行数:4,代码来源:DB.cs


示例18: DB_SEQUENCE

 internal DB_SEQUENCE(DB dbp, uint flags)
     : this(libdb_csharpPINVOKE.new_DB_SEQUENCE(DB.getCPtr(dbp), flags), true)
 {
 }
开发者ID:hyc,项目名称:BerkeleyDB,代码行数:4,代码来源:DB_SEQUENCE.cs


示例19: 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);
     BTreeDatabase btdb = (BTreeDatabase)(db.api_internal);
     return btdb.PrefixCompare(
         DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
 }
开发者ID:mcandre,项目名称:db,代码行数:10,代码来源:BTreeDatabase.cs


示例20: doMsgFeedback

 private static void doMsgFeedback(IntPtr dbp, string msg)
 {
     DB db = new DB(dbp, false);
     db.api_internal.msgFeedbackHandler(msg);
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:5,代码来源:BaseDatabase.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Internal.DBT类代码示例发布时间:2022-05-24
下一篇:
C# BerkeleyDB.TransactionConfig类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap