⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 convert.so

📁 berkeley db 4.6.21的源码。berkeley db是一个简单的数据库管理系统
💻 SO
字号:
m4_comment([$Id: convert.so,v 11.6 2000/03/18 21:43:19 bostic Exp $])m4_ref_title(Upgrading m4_db Applications,    Release 2.0: converting applications,,    upgrade.2.0/system, upgrade.2.0/disk)m4_p([dnlMapping the m4_db 1.85 functionality into m4_db version 2 is almost alwayssimple.  The manual page m4_ref(dbh_open) replaces the m4_db 1.85 manualpages m4_manref(dbopen, 3), m4_manref(btree, 3), m4_manref(hash, 3) andm4_manref(recno, 3).  You should be able to convert each 1.85 functioncall into a m4_db version 2 function call using just the m4_ref(dbh_open)documentation.])m4_p([dnlSome guidelines and things to watch out for:])m4_nlistbeginm4_nlist([dnlMost access method functions have exactly the same semantics as in m4_db1.85, although the arguments to the functions have changed in some cases.To get your code to compile, the most common change is to add thetransaction ID as an argument (NULL, since m4_db 1.85 did not supporttransactions.)])m4_nlist([dnlYou must always initialize DBT structures to zero before using them withany m4_db version 2 function.  (They do not normally have to bereinitialized each time, only when they are first allocated.  Do this bydeclaring the DBT structure external or static, or by calling the Clibrary routine m4_manref(bzero, 3) or m4_manref(memset, 3).)])m4_nlist([dnlThe error returns are completely different in the two versions.  In m4_db1.85, __LT__ 0 meant an error, and __GT__ 0 meant a minor m4_db exception.In m4_db 2.0, __GT__ 0 means an error (the m4_db version 2 functionsreturn m4_envvar(errno) on error) and __LT__ 0 means a m4_db exception.See m4_link(M4RELDIR/ref/program/errorret, Error Returns to Applications)for more information.])m4_nlist([dnlThe m4_db 1.85 DB-__GT__seq function has been replaced by cursors in m4_dbversion 2.  The semantics are approximately the same, but cursors requirethe creation of an extra object (the DBC object), which is then used toaccess the database.m4_p([dnlSpecifically, the partial key match and range search functionality of theR_CURSOR flag in DB-__GT__seq has been replaced by them4_ref(DB_SET_RANGE) flag in m4_ref(dbc_get).])])m4_nlist([dnlIn version 2 of the m4_db library, additions or deletions into Recno(fixed and variable-length record) databases no longer automaticallylogically renumber all records after the add/delete point, by default.The default behavior is that deleting records does not cause subsequentrecords to be renumbered, and it is an error to attempt to add new recordsbetween records already in the database.  Applications wanting thehistoric Recno access method semantics should call them4_refT(dbh_set_flags) with the m4_ref(DB_RENUMBER) flag.])m4_nlist([dnlOpening a database in m4_db version 2 is a much heavier-weight operationthan it was in m4_db 1.85.  Therefore, if your historic applications werewritten to open a database, perform a single operation, and close thedatabase, you may observe performance degradation.  In most cases, thisis due to the expense of creating the environment upon each open.   Whilewe encourage restructuring your application to avoid repeated opens andcloses, you can probably recover most of the lost performance by simplyusing a persistent environment across invocations.])m4_nlistendm4_p([dnlWhile simply converting m4_db 1.85 function calls to m4_db version 2function calls will work, we recommend that you eventually reconsider yourapplication's interface to the m4_db database library in light of theadditional functionality supplied by m4_db version 2, as it is likely toresult in enhanced application performance.])m4_page_footer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -