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

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

?? fastdb.htm

?? 嵌入式數據庫軟件 嵌入式數據庫軟件 嵌入式數據庫軟件
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
After loading all class descriptors, FastDB checks if all indices specified in the application class descriptor are already present in the database, constructs new indices andremoves indices, which are no more used. Reformatting the table and adding/removing indices is only possible when no more than oneapplication accesses the database. So when the first application is attachedto the database, it can perform table conversion. All other applicationscan only add new classes to the database.<P>There is one special internal database  <code>Metatable</code>, whichcontains information about other tables in the database. C++ programmersneed not access this table, because the format of database tables is specifiedby C++ classes. But in an interactive SQL program, it may be necessary toexamine this table to get information about record fields.<P>Starting from version 2.30 FastDB supports autoincrement fields(fields unique value to which are assigned automaticaly by database).To be able to use them you should:<P><OL><LI>Recompile FastDB and your application with <code>-DAUTOINCREMENT_SUPPROT</code> flags (add this flag to <code>DEFS</code> variables in FastDB makefile).<BR><B>Attention</B>: database files created by FastDB compiled without this option will be incompatible with FastDB compiled with <code>DAUTOINCREMENT_SUPPORT</code>.<LI>If you want to use other than 0 initial counter value, you shouldasssign value to <code>dbTableDescriptor::initialAutoincrementCount</code>.It will be shared between all tables, so all table will have the same initial value of autoincrement counter.<LI>Autoincrement fields should be of int4 type and should be declaredwith <code>AUTOINCREMENT</code> flag:<PRE>        class Record {             int4 rid;             char const* name;             ...                    TYPE_DESCRIPTOR((KEY(rid, AUTOINCREMENT|INDEXED), FIELD(name), ...));       }</PRE>              <LI>When record with autoincrement field is inserted in the databasethere is no need to specify value of autoincremented field (it will beignored). After successful insertion of record this field will beassigned unique value (which is guaranteed to be not used before thistable):<PRE>       Record rec;       // no rec.rid should be specified       rec.name = "John Smith";       insert(rec);       // rec.rid now assigned unique value       int newRecordId  = rec.rid; // and can be used to reference this record</PRE><LI>When record is removed the value will not be reused.When transaction is aborted, table autoincrement counter is also rolled back.</OL><P><H3><A NAME = "query">Query</A></H3>The class query is used to serve two purposes: <OL><LI>to construct a query and bind query parameters<LI>to cache compiled queries</OL>FastDB provides overloaded '<code>=</code>' and '<code>,</code>' C++ operatorsto construct query statements with parameters. Parameters can be specified  directly in places where they are used, eliminating any mapping betweenparameter placeholders and C variables. In the following sample query,pointers to the parameters <code>price</code> and <code>quantity</code> are stored in the query, so that the query can be executed several timeswith different parameter values. C++ overloaded functions make it possibleto automatically determine the type of the parameter, requiring no extra informationto be supplied by the programmer (such reducing the possibility of a bug). <PRE>        dbQuery q;        int price, quantity;        q = "price >=",price,"or quantity >=",quantity;</PRE> Since the  <code>char*</code> type can be used both for specifying a fractionof a query (such as "price >=") and for a parameter of string type,FastDB uses a special rule to resolve this ambiguity. This rule is based on theassumption that there is no reason for splitting a query text into two stringslike ("price ",">=") or specifying more than one parameter sequentially("color=",color,color). So FastDB assumes the first string to be a fractionof the query text and switches to <I>operand mode</I>after it. In <I>operand mode</I>, FastDB treats the <code>char*</code> argumentas a query parameter and switches back to query <I>text mode</I>, and so on...It is also possible not to use this "syntax sugar" and constructquery elements explicitly by the <code>dbQuery::append(dbQueryElement::ElementType type, void const* ptr)</code>method. Before appending elements to the query,it is necessary to reset the query by the <code>dbQuery::reset()</code> method('<code>operator=</code>' does it automatically).<P>It is not possible to use C++ numeric constants as query parameters, becauseparameters are accessed by reference. But it is possible to use stringconstants, because strings are passed by value. There two possible ways of specifying string parameters in a query: using a string buffer or apointer to pointer to string:<P><PRE>     dbQuery q;     char* type;     char name[256];     q = "name=",name,"and type=",&type;     scanf("%s", name);     type = "A";          cursor.select(q);     ...     scanf("%s", name);     type = "B";          cursor.select(q);     ...</PRE><P>Query variables can neither be passed to a function as a parameternor be assigned to another variable.When FastDB compiles the query, it saves the compiled tree in this object. The next time the query will be used, no compilation is needed and the already compiledtree can be used. It saves some time needed for query compilation.<P>FastDB provides two approaches to integrate user-defined types in databases.The first - the definition of class methods - was already mentioned. The other approach deals only with query construction. Programmers shoulddefine methods, which will not do actual calculations, but insteadreturn an expression (in terms of predefined database types), whichperforms the necessary calculation. It is better to describe it by example.FastDB has no builtin datetime type. Instead of this, a normal C++class <code>dbDateTime</code> can be used by the programmer. This class definesmethods allowing to specify datetime fields in ordered lists andto compare two dates using normal relational operators:<P><PRE>class dbDateTime {     int4 stamp;  public:    ...    dbQueryExpression operator == (char const* field) { 	dbQueryExpression expr;	expr = dbComponent(field,"stamp"),"=",stamp;	return expr;    }    dbQueryExpression operator != (char const* field) { 	dbQueryExpression expr;	expr = dbComponent(field,"stamp"),"<>",stamp;	return expr;    }    dbQueryExpression operator &lt; (char const* field) { 	dbQueryExpression expr;	expr = dbComponent(field,"stamp"),">",stamp;	return expr;    }    dbQueryExpression operator &lt;= (char const* field) { 	dbQueryExpression expr;	expr = dbComponent(field,"stamp"),">=",stamp;	return expr;    }    dbQueryExpression operator &gt; (char const* field) { 	dbQueryExpression expr;	expr = dbComponent(field,"stamp"),"<",stamp;	return expr;    }    dbQueryExpression operator &gt;= (char const* field) { 	dbQueryExpression expr;	expr = dbComponent(field,"stamp"),"<=",stamp;	return expr;    }    friend dbQueryExpression between(char const* field, dbDateTime& from,				     dbDateTime& till)    { 	dbQueryExpression expr;	expr=dbComponent(field,"stamp"),"between",from.stamp,"and",till.stamp;	return expr;    }    friend dbQueryExpression ascent(char const* field) { 	dbQueryExpression expr;	expr=dbComponent(field,"stamp");	return expr;    }	    friend dbQueryExpression descent(char const* field) { 	dbQueryExpression expr;	expr=dbComponent(field,"stamp"),"desc";	return expr;    }	};</PRE>All these methods receive as their parameter a name of a field in the record.This name is used to contract the full name of the record's component.This  can be done by class <code>dbComponent</code>, which constructor takesthe name of the structure field and the name of the component of the structureand returns a compound name separated by a '.' symbol.The class <code>dbQueryExpression</code> is used to collect expression items.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, 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费日本视频一区| 亚洲欧洲综合另类在线| 国产精品麻豆欧美日韩ww| 亚洲男女一区二区三区| 日本欧美一区二区| 国产成人av电影在线观看| 91小视频免费观看| 日韩欧美中文字幕制服| 国产拍欧美日韩视频二区| 亚洲在线视频免费观看| 韩国v欧美v亚洲v日本v| 色婷婷综合久久久久中文| 69堂亚洲精品首页| 国产精品嫩草影院av蜜臀| 亚洲mv在线观看| 懂色av一区二区夜夜嗨| 欧美精品一卡两卡| 国产精品久久久久久久午夜片| 午夜精品久久久| 成人激情校园春色| 欧美一区午夜视频在线观看| 1000部国产精品成人观看| 男人操女人的视频在线观看欧美| 97久久精品人人做人人爽| 日韩欧美国产系列| 亚洲一区二区三区不卡国产欧美| 国产精品77777| 欧美一卡在线观看| 亚洲一区二区三区视频在线 | 欧美日韩久久久一区| 国产三区在线成人av| 婷婷激情综合网| av一区二区不卡| 久久久91精品国产一区二区精品| 日韩在线卡一卡二| 色综合久久天天| 国产欧美一二三区| 久久精品二区亚洲w码| 欧美日韩在线亚洲一区蜜芽| 国产精品不卡一区| 国产一区啦啦啦在线观看| 欧美一区午夜精品| 亚洲国产成人av| 色狠狠一区二区| 国产精品久久久久久久久久免费看| 精品一二三四在线| 91麻豆精品国产自产在线观看一区| 亚洲黄色性网站| 99久久久国产精品| 国产精品久久久久久户外露出 | 亚洲国产成人在线| 久久99九九99精品| 欧美一级片在线观看| 亚洲国产欧美另类丝袜| 97久久精品人人爽人人爽蜜臀| 久久九九全国免费| 国产精品一区二区三区乱码| 欧美大片在线观看一区| 免费在线观看视频一区| 91精品福利在线一区二区三区| 亚洲午夜精品一区二区三区他趣| 91麻豆国产香蕉久久精品| 欧美极品少妇xxxxⅹ高跟鞋 | 国产精品美女久久久久久久久久久| 在线免费观看成人短视频| 国产精品你懂的在线欣赏| 成人综合在线观看| 日本一区二区免费在线| 粉嫩在线一区二区三区视频| 欧美极品xxx| 99精品视频在线观看| 亚洲天堂精品视频| 日本福利一区二区| 亚洲一区在线视频| 在线播放日韩导航| 久久精品av麻豆的观看方式| 欧美大片一区二区三区| 韩国视频一区二区| 国产精品午夜春色av| 99re成人精品视频| 亚洲国产精品一区二区尤物区| 欧美精品1区2区| 麻豆91小视频| 欧美激情一区二区| 色婷婷久久久久swag精品| 亚洲一区二区三区四区五区中文| 欧美日韩黄色影视| 久久国产精品第一页| 国产亚洲欧美在线| 99热国产精品| 五月天欧美精品| 欧美成人aa大片| 成人免费视频国产在线观看| 亚洲婷婷综合久久一本伊一区| 欧美私模裸体表演在线观看| 日韩电影免费在线观看网站| 精品国产91乱码一区二区三区| 东方欧美亚洲色图在线| 亚洲精品久久久蜜桃| 欧美一区永久视频免费观看| 国产在线精品一区在线观看麻豆| 国产精品不卡在线| 欧美伦理影视网| 国产精品一区2区| 艳妇臀荡乳欲伦亚洲一区| 91麻豆精品国产91久久久资源速度| 激情亚洲综合在线| 亚洲欧美偷拍卡通变态| 欧美高清激情brazzers| 国产乱码精品一区二区三区av| 亚洲人成网站在线| 日韩视频一区在线观看| 成人黄色网址在线观看| 天天操天天色综合| 中文字幕国产精品一区二区| 欧美日韩国产一级片| 国产91清纯白嫩初高中在线观看| 亚洲午夜久久久久久久久久久 | 国产91高潮流白浆在线麻豆| 一区二区三区欧美| 久久日韩粉嫩一区二区三区| 色综合天天做天天爱| 极品少妇一区二区| 夜夜精品视频一区二区| 久久久久久夜精品精品免费| 在线免费av一区| 国产99久久久久| 日产国产欧美视频一区精品| **性色生活片久久毛片| 欧美成人性战久久| 欧美性高清videossexo| 福利一区在线观看| 青青草原综合久久大伊人精品优势| 亚洲欧洲国产专区| 2023国产精品| 在线观看91精品国产麻豆| 99热这里都是精品| 国产麻豆精品久久一二三| 日韩中文字幕麻豆| 亚洲视频小说图片| 国产欧美日韩在线观看| 欧美一级视频精品观看| 91豆麻精品91久久久久久| 日韩一区二区三区免费看| 91捆绑美女网站| 国产福利91精品| 九九热在线视频观看这里只有精品| 一区二区三区在线免费视频| 日本一区二区免费在线观看视频| 日韩欧美卡一卡二| 69成人精品免费视频| 欧洲一区二区av| 99视频在线精品| 国产69精品久久久久毛片| 免费成人在线观看| 天堂va蜜桃一区二区三区| 亚洲综合图片区| 亚洲人成网站精品片在线观看| 国产亚洲欧美在线| 久久香蕉国产线看观看99| 日韩精品一区二区三区四区视频| 欧美日韩国产区一| 欧美亚洲综合一区| 欧美性一区二区| 91福利国产精品| 在线亚洲免费视频| 日本韩国欧美在线| 91免费在线播放| zzijzzij亚洲日本少妇熟睡| 粉嫩av一区二区三区粉嫩 | 国产精品亲子乱子伦xxxx裸| 久久美女艺术照精彩视频福利播放 | 欧美激情在线免费观看| 欧美大片顶级少妇| 精品国产一区二区三区久久久蜜月| 5566中文字幕一区二区电影| 欧美疯狂做受xxxx富婆| 欧美日韩午夜精品| 欧美日韩视频在线一区二区| 欧美日韩国产不卡| 欧美日韩精品一二三区| 7777精品伊人久久久大香线蕉最新版 | 中文字幕第一区第二区| 欧美激情中文字幕| 最新不卡av在线| 亚洲激情欧美激情| 亚洲第一搞黄网站| 日本中文字幕不卡| 国模冰冰炮一区二区| 国产精品自拍三区| aaa欧美大片| 在线一区二区视频| 在线播放/欧美激情| 欧美成人乱码一区二区三区| 久久久久久久综合日本| 国产精品三级在线观看| 亚洲精品美国一| 日本午夜一区二区| 国产黑丝在线一区二区三区| av在线一区二区三区|