亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fastdb.htm

?? FastDb是高效的內存數據庫系統
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
The expression is automatically enclosed in parentheses, eliminating conflictswith operator precedence.<P>So, assuming a record containing a field <code>delivery</code>of dbDateTime type, it is possibleto construct queries like these:<PRE>        dbDateTime from, till;        q1 = between("delivery", from, till),"order by",ascent("delivery");        q2 = till &gt;= "delivery"; </PRE>In addition to these methods, some class specific method can be definedin such way, for example the method <code>overlaps</code> for a region type.The benefit of this approach is that a database engine will workwith predefined types and is able to apply indices and other optimizationsto proceed such query. And from the other side, the encapsulation of the classimplementation is preserved, so programmers should not rewrite all querieswhen a class representation is changed.<P>Variables of the following C++ types can be used as query parameters:<P><TABLE BORDER ALIGN="center"><TR><TD WIDTH=50%>int1</TD><TD WIDTH=50%>bool</TD></TR><TR><TD>int2</TD><TD>char const*</TD></TR><TR><TD>int4</TD><TD>char **</TD></TR><TR><TD>int8</TD><TD>char const**</TD></TR><TR><TD>real4</TD><TD>dbReference&lt;T&gt;</TD></TR><TR><TD>real8</TD><TD>dbArray&lt; dbReference&lt;T&gt; &gt;</TD></TR></TABLE><P><H3><A NAME = "cursor">Cursor</A></H3>Cursors are used to access records returned by a select statement. FastDB provides typed cursors, i.e. cursors associated with concrete tables.There are two kinds of cursors in FastDB: readonly cursors and cursors for update. Cursors in FastDB are represented by the  C++ template class <code>dbCursor&lt;T&gt;</code>, where <code>T</code> is the name of a C++ class associated withthe database table. The cursor type should be specified in the constructorof the cursor. By default, a read-only cursor is created.To create a cursor for update, you should pass a parameter <code>dbCursorForUpdate</code> to the constructor.<P>A query is executed either by the cursor<code>select(dbQuery& q)</code> method.Or by the <code>select()</code> method, which can be used to iterate throughall records in the table. Both methods return the number of selected recordsand set the current position to the first record (if available).A cursor can be scrolled in forward or backward direction.The methods <code>next(), prev(), first(), last()</code> can be used to change the current position of the cursor. If no operation can be performed as there are no (more) recordsavailable, these methods return <code>NULL</code>and the cursor position is not changed.<P>A cursor for class T contains an instance of class T, used for fetching thecurrent record. That is why table classes should have a default constructor(constructor without parameters), which has no side effects. FastDB optimizes fetching records from the database, copying only data fromfixed parts of the object. String bodies are not copied, insteadof this  the correspondent field points directly into the database. The same istrue for arrays: their components have the same representation in thedatabase as in the application (arrays of scalar types or arrays of nested structures of scalar components).<P>An application should not changeelements of strings and arrays in a database directly.When an array method needs to update an array body,it creates an in-memory copy of the array and updates this copy. If the programmer wants to update a string field, she/he should assignto the pointer a new value, but don't change the string directly in the database.It is recommended to use the <code>char const*</code> type instead of the<code>char*</code> type for string components, to enable the compiler to detect the illegal usage of strings.<P>The cursor class provides the <code>get()</code> method for obtaining a pointer to the current record (stored inside the cursor). Also the overloaded '<code>operator-&gt;</code>'can be used to access components of the current record.If a cursor is opened for update,the current record can be changed and stored in the databaseby the <code>update()</code> method or can be removed.If the current record is removed, the next record becomes thecurrent. If there is no next record, then the previous record(if it exists)  becomes the current. The method <code>removeAll()</code>removes all records in the table.Whereas the method <code>removeAllSelected</code> only removes all records selected by the cursor.<P>When records are updated, the size of the database may increase.Thus an extension of the database section in the virtual memory is needed. As a result of such remapping, base addresses of the section can bechanged and all pointers to database fields kept by applications will become invalid. FastDB automatically updates current records in all opened cursors when a database section is remapped. So, when a database is updated, the programmer should access record fields only through the cursor <code>-&gt;</code> method. She/he should  not use pointer variables.<P>Memory used for the current selection can be released by the<code>reset()</code> method.This method is automatically called by the <code>select(), dbDatabase::commit(), dbDatabase::rollback()</code> methodsand the cursor destructor, so in most cases there is no need tocall the <code>reset()</code> method explicitly.<P>Cursors can also be used to access records by reference. The method<code>at(dbReference&lt;T&gt; const& ref)</code> sets the cursor to the recordpointed to by the reference. In this case, the selection consists exactly ofone record and the <code>next(), prev()</code> methods will always return <code>NULL</code>. Since cursors and references in FastDB are strictly typed, all necessary checking can be done statically by the compiler and no dynamic type checking is needed. The only kind of checking,which is done at runtime, is checking for null references.The object identifier of the current record in the cursor can be obtained bythe <code>currentId()</code> method.<P> It is possible to restrict the number of records returned by a select statement.The cursor class has the two methods<code>setSelectionLimit(size_t lim)</code> and<code>unsetSelectionLimit()</code>,which can be used to set/unset the limitof numbers of records returned by the query. In some situations,a  programmer may want to receiveonly one record or only few first records;  so the query executiontime and size of consumed memory can be reduced by limiting the size of selection. But if you specify an order for selected records, the query with the restriction to <I>k</I> records will not return the first <I>k</I> recordswith the smallest value of the key. Instead of this, arbitrary <I>k</I>records will be taken and then sorted.<P>So all operations with database data can be performed by means ofcursors. The only exception is the insert operation, for which FastDB provides an overloaded insert function:<PRE>        template&lt;class T&gt;        dbReference&lt;T&gt; insert(T const& record);</PRE>This function will insert a record at the end of the table and returna reference of the created object.The order of insertion is strictly specified in FastDBand applications can use this assumption about the record order in thetable. For applications widely using references for navigation betweenobjects, it is necessary to have some <I>root</I> object, from which atraversal by references can be made. A good candidate for such root objectis the first record in the table (it is also the oldest record in the table). This record can be accessed by execution of the <code>select()</code>method without parameter. The current record in the cursor willbe the first record in the table.<P>The C++ API of FastDB defines a special <code>null</code> variableof reference type.It is possible to compare the <code>null</code> variable with references or assign it to the reference:<P><PRE>        void update(dbReference&lt;Contract&gt; c) {            if (c != null) { 	        dbCursor&lt;Contract&gt; contract(dbCursorForUpdate);		contract.at(c);		contract-&gt;supplier = null;            }        }</PRE><A NAME="relative-parameter-binding">Query parameters usually are bound to C++ variables. In most cases in is convenient and flexible mechanism. But in multithreaded application, there is no warranty that the same query will not be executed at the same moment of time by another thread with different valuesof parameters. One solution is to use synchronization primitives (critical sections or mutexes)to prevent concurrent execution of the query. But this will lead to performance degradation.FastDB is able to perform read requests in parallel, increasing total system throughput.The other solution is to use delayed parameter binding. This approach is illustrated by the following example:<P>  <PRE>dbQuery q;struct QueryParams {     int         salary;    int         age;    int         rank;};void open(){    QueryParams* params = (QueryParams*)NULL;    q = "salary > ", params->salary, "and age < ", params->age, "and rank =", params->rank;}void find(int salary, int age, int rank) {     QueryParams params;    params.salary = salary;    params.age = age;    params.rank = rank;    dbCursor&lt;Person&gt; cusor;    if (cursor.select(q, &params) &gt; 0) {         do { 	    cout &lt;&lt; cursor->name &lt;&lt; NL;        } while (cursor.next());    }}</PRE>So in this example function <code>open</code> binds query parameters just to offsets of fields in structure. Later in <code>find</code> functions, actual pointer to the structurewith parameters is passed to the <code>select</code> structure. Function <code>find</code>can be concurrently executed by several threads and only one compiled version of the queryis used by all these threads. This mechanism is available since version 2.25.<P></A><H3><A NAME = "database">Database</A></H3>The class <code>dbDatabase</code> controls the application interactionswith the database. It performs synchronization of concurrent accesses to thedatabase, transaction management, memory allocation, error handling,...<P>The constructor of <code>dbDatabase</code> objects allows programmers to specifysome database parameters:<PRE>    dbDatabase(dbAccessType type = dbAllAccess,	       size_t dbInitSize = dbDefaultInitDatabaseSize,	       size_t dbExtensionQuantum = dbDefaultExtensionQuantum,	       size_t dbInitIndexSize = dbDefaultInitIndexSize,	       int nThreads = 1);</PRE>The following database access type are supported:<P><TABLE BORDER><TR><TH>Access type</TH><TH>Description</TH></TR><TR><TD><code>dbDatabase::dbReadOnly</code></TD><TD>Read only mode</TD></TR><TR><TD><code>dbDatabase::dbAllAccess</code></TD><TD>Normal mode</TD></TR><TR><TD><code>dbDatabase::dbConcurrentRead</code></TD><TD>Read only mode in which application can access the database concurrently with application updating the same database in <code>dbConcurrentUpdate</code> mode</TD></TR><TR><TD><code>dbDatabase::dbConcurrentUpdate</code></TD><TD>Mode to be used in conjunction with<code>dbConcurrentRead</code> to perform updates in the database without blocking read applications for a long time</TD></TR></TABLE><P>When the database is opened in readonly  mode, no new class definitions can be added to the database and definitionsof existing classes and indices can not be altered.<P><code>dbConcurrentUpdate</code> and <code>dbConcurrentRead</code> modes should be used together when database is mostly accessed in readonly mode and updates should not block readers for a long time. In this mode update of the database can be performed concurrently with read accesses (readers will not see changed data until transaction is committed). Only at update transaction commit time, exclusive lock is setbut immediately released after incremental change of the current object index.<P>So you can start one or more  applications using <code>dbConcurrentRead</code> mode and all their read-onlytransactions will be executed concurrently. You can also start one or more applications using  <code>dbConcurrentUpdate</code> mode. All transactions of such applications will be synchronized using additionalglobal mutex. So all these transactions (even read-only) will be executed exclusively. But transactions of the applicationrunning in <code>dbConcurrentUpdate</code> mode can run concurrently with transaction of applicationsrunning in <code>dbConcurrentRead</code> mode! Please look at <code>testconc.cpp</code> example, illustrating usage of these modes<P><B>Attension!</B> Do not mix <code>dbConcurrentUpdate</code> and <code>dbConcurrentRead</code> mode with other modes and do not use them together in one process (so it isnot possible to start two threads in one of which open database indbConcurrentUpdate mode and in other - in dbConcurrentRead). Do not use <code>dbDatabase::precommit</code> method in <code>dbConcurrentUpdate</code> mode.<P>The parameter <code>dbInitSize</code> specifies the initial size of the database file.The database file increases on demand; setting the initial size can only reduce the number of reallocations (which can take a lot of time).In the current implementation of the FastDB databasethe size is at least doubled at each extension.The default value of this parameter is 4 megabytes.<P>The parameter <code>dbExtensionQuantum</code>specifies the quantum of extension of thememory allocation bitmap. Briefly speaking, the value of this parameter specifies how much memorywill be allocated sequentially withou

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久电影国产免费久久电影 | 97国产一区二区| wwwwxxxxx欧美| 国产精品一区2区| 中文字幕第一区综合| 成人毛片视频在线观看| 成人欧美一区二区三区视频网页| 成人avav在线| 亚洲一区在线播放| 日韩一级二级三级精品视频| 国产一区二区三区蝌蚪| 久久久久国产精品人| 91网站视频在线观看| 偷窥少妇高潮呻吟av久久免费| 欧美日本一道本在线视频| 精品一区二区在线播放| 欧美激情一区二区三区全黄| 在线观看视频一区| 美美哒免费高清在线观看视频一区二区 | 日韩理论在线观看| 欧美二区乱c少妇| 国产一区啦啦啦在线观看| 国产精品久久久久久亚洲伦| 欧美美女bb生活片| 国产成a人亚洲| 亚洲国产一区视频| 337p日本欧洲亚洲大胆色噜噜| 色综合中文字幕| 午夜日韩在线电影| 国产日产精品1区| 欧美精选一区二区| 成人免费高清在线| 蜜桃精品在线观看| 亚洲欧美日韩一区二区| 欧美成人一区二区三区在线观看 | 欧美一区二区三区日韩| 亚洲一区精品在线| 91免费国产视频网站| 日韩不卡免费视频| 1000精品久久久久久久久| 3751色影院一区二区三区| 波多野结衣中文字幕一区二区三区| 亚洲二区在线视频| 欧美国产欧美综合| 精品国产一区二区亚洲人成毛片| 色婷婷av一区二区三区软件 | 国产欧美综合在线观看第十页| 欧美性一级生活| 国产成人av网站| 日韩av中文字幕一区二区三区| 亚洲三级电影全部在线观看高清| 日韩欧美在线影院| 在线观看欧美黄色| 99精品欧美一区| 成人午夜av影视| 全国精品久久少妇| 丝袜诱惑亚洲看片| 夜夜嗨av一区二区三区四季av| 国产精品久久久久桃色tv| 久久综合九色欧美综合狠狠 | 久久婷婷综合激情| 日韩一区国产二区欧美三区| 欧美日韩一卡二卡三卡 | 日韩在线一区二区| 亚洲成人先锋电影| 亚洲第一综合色| 一区二区三区小说| 18欧美亚洲精品| 日本一区二区免费在线观看视频| 欧美一区二区免费视频| 欧美日韩一级视频| 欧美精品自拍偷拍| 欧美伦理电影网| 欧美精品18+| 欧美年轻男男videosbes| 在线免费观看成人短视频| 99热这里都是精品| 9人人澡人人爽人人精品| 99久久精品情趣| 色综合久久88色综合天天6| 99久久99久久免费精品蜜臀| a美女胸又www黄视频久久| 波多野结衣91| 91麻豆swag| 欧美午夜精品久久久久久孕妇| 欧美三级日韩三级| 欧美高清dvd| 久久这里只有精品6| 国产日韩精品一区二区浪潮av| 国产欧美一区视频| 亚洲视频一区二区在线| 亚洲高清免费视频| 日韩 欧美一区二区三区| 日韩av一区二区在线影视| 久久精品国产亚洲高清剧情介绍 | 免费欧美在线视频| 国产麻豆精品95视频| 国产成人精品1024| www.一区二区| 欧美日韩一级二级三级| 日韩欧美在线观看一区二区三区| 精品少妇一区二区三区| 久久久天堂av| 亚洲黄色av一区| 青椒成人免费视频| 成人午夜免费视频| 欧美日韩精品福利| 久久久蜜桃精品| 一区二区三区美女视频| 午夜精品免费在线观看| 国产一区二区三区四| 91福利精品视频| 精品国产乱码久久久久久免费| 国产精品网站在线观看| 亚洲在线观看免费| 国产精品亚洲第一区在线暖暖韩国 | 日韩毛片精品高清免费| 一区二区三区精品在线观看| 亚洲一区二区三区在线| 全部av―极品视觉盛宴亚洲| 国产精品亚洲第一| 欧洲一区二区三区在线| 国产亚洲欧美日韩日本| 亚洲18色成人| 成人免费av资源| 欧美电影免费提供在线观看| 国产精品久久久久久久久果冻传媒| 午夜精品视频一区| 99精品1区2区| 精品国内片67194| 综合久久久久久久| 久久国产婷婷国产香蕉| 色综合亚洲欧洲| 欧美极品xxx| 日本91福利区| 欧美性猛交xxxx黑人交| 久久久久久久综合日本| 免费成人在线视频观看| 一本在线高清不卡dvd| 国产亚洲女人久久久久毛片| 日韩中文字幕一区二区三区| 色综合天天综合网天天狠天天 | 国产精品久久一卡二卡| 免播放器亚洲一区| 欧美日免费三级在线| 亚洲欧美日韩国产手机在线| 国产伦精品一区二区三区免费迷| 欧美人妇做爰xxxⅹ性高电影| 1024亚洲合集| 国产成人免费在线| 精品国产乱码91久久久久久网站| 日韩高清不卡在线| 欧美另类变人与禽xxxxx| 一个色在线综合| 97se亚洲国产综合自在线观| 国产网站一区二区| 国产一区二区三区视频在线播放| 欧美一区二区三区视频免费| 视频一区二区三区在线| 欧美日韩国产一级二级| 亚洲伊人色欲综合网| 一本色道久久综合亚洲91| 国产精品私房写真福利视频| 国产精品77777| 国产亚洲成av人在线观看导航| 国产在线精品一区二区夜色 | 欧美性色黄大片| 夜色激情一区二区| 日本韩国视频一区二区| 一区二区三区久久| 欧美日韩视频不卡| 三级亚洲高清视频| 日韩一区二区在线观看| 裸体一区二区三区| 久久蜜桃一区二区| 国产成人福利片| 亚洲欧美综合色| 日本久久电影网| 亚洲一区二区在线观看视频| 欧美日韩亚洲另类| 日韩福利视频导航| 久久看人人爽人人| 成人一二三区视频| 国产精品灌醉下药二区| 色婷婷av一区| 日本在线不卡视频一二三区| 日韩欧美久久一区| 东方aⅴ免费观看久久av| 亚洲色欲色欲www| 欧美精品在线观看播放| 激情另类小说区图片区视频区| 久久精品一二三| 色菇凉天天综合网| 日韩福利视频导航| 久久精品一二三| 91久久久免费一区二区| 青青青爽久久午夜综合久久午夜| 久久精品视频在线免费观看| 91香蕉视频mp4| 日韩av一区二区三区四区|