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

📄 cli_8h-source.html

📁 俄罗斯牛人KK的作品,著名的ORDBMS,这里上传最新的3.39版本源代码.希望了解对象关系数据库的同好,请不要错过.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
00500 <span class="comment"> * Returns:</span>00501 <span class="comment"> *     result code as described in cli_result_code enum</span>00502 <span class="comment"> */</span>00503 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_commit(<span class="keywordtype">int</span> session);00504 00505 <span class="comment">/*********************************************************************</span>00506 <span class="comment"> * cli_precommit</span>00507 <span class="comment"> *     Release all locks set by transaction. This methods allows other clients</span>00508 <span class="comment"> *     to proceed, but it doesn't flush transaction to the disk.</span>00509 <span class="comment"> * Parameters:</span>00510 <span class="comment"> *     session - session descriptor as returned by cli_open</span>00511 <span class="comment"> * Returns:</span>00512 <span class="comment"> *     result code as described in cli_result_code enum</span>00513 <span class="comment"> */</span>00514 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_precommit(<span class="keywordtype">int</span> session);00515 00516 <span class="comment">/*********************************************************************</span>00517 <span class="comment"> * cli_abort</span>00518 <span class="comment"> *     Abort current database transaction</span>00519 <span class="comment"> * Parameters:</span>00520 <span class="comment"> *     session - session descriptor as returned by cli_open</span>00521 <span class="comment"> * Returns:</span>00522 <span class="comment"> *     result code as described in cli_result_code enum</span>00523 <span class="comment"> */</span>00524 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_abort(<span class="keywordtype">int</span> session);00525 00526 00527 <span class="keyword">enum</span> cli_field_flags { 00528     cli_hashed           = 1, <span class="comment">/* field should be indexed usnig hash table */</span>00529     cli_indexed          = 2  <span class="comment">/* field should be indexed using B-Tree */</span>00530 };00531 00532 <span class="keyword">typedef</span> <span class="keyword">struct </span>cli_field_descriptor { 00533     <span class="keyword">enum</span> cli_var_type type;00534     <span class="keywordtype">int</span>               flags;00535     <span class="keywordtype">char</span> <span class="keyword">const</span>*       name;00536     <span class="keywordtype">char</span> <span class="keyword">const</span>*       refTableName;00537     <span class="keywordtype">char</span> <span class="keyword">const</span>*       inverseRefFieldName;00538 } cli_field_descriptor;00539 00540 <span class="comment">/*********************************************************************</span>00541 <span class="comment"> * cli_describe</span>00542 <span class="comment"> *     Describe fields of specified table</span>00543 <span class="comment"> * Parameters:</span>00544 <span class="comment"> *     session - session descriptor as returned by cli_open</span>00545 <span class="comment"> *     table   - name of the table</span>00546 <span class="comment"> *     fields  - address of the pointer to the array of fields descriptors, </span>00547 <span class="comment"> *               this array should be later deallocated by application by cli_free_memory()</span>00548 <span class="comment"> * Returns:</span>00549 <span class="comment"> *     &gt;= 0 - number of fields in the table</span>00550 <span class="comment"> *     &lt; 0  - result code as described in cli_result_code enum</span>00551 <span class="comment"> */</span>00552 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_describe(<span class="keywordtype">int</span> session, <span class="keywordtype">char</span> <span class="keyword">const</span>* table, cli_field_descriptor** fields);00553 00554 00555 <span class="comment">/*********************************************************************</span>00556 <span class="comment"> * cli_get_field_size</span>00557 <span class="comment"> *     Calculate field size</span>00558 <span class="comment"> * Parameters:</span>00559 <span class="comment"> *     fields  - array with fields descriptors obtained using cli_describe function</span>00560 <span class="comment"> *     field_no - number of the field</span>00561 <span class="comment"> */</span>00562 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_get_field_size(cli_field_descriptor* fields, <span class="keywordtype">int</span> field_no);00563 00564 <span class="comment">/*********************************************************************</span>00565 <span class="comment"> * cli_get_field_offset</span>00566 <span class="comment"> *     Calculate offset of the field </span>00567 <span class="comment"> * Parameters:</span>00568 <span class="comment"> *     fields  - array with fields descriptors obtained using cli_describe function</span>00569 <span class="comment"> *     field_no - number of the field</span>00570 <span class="comment"> */</span>00571 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_get_field_offset(cli_field_descriptor* fields, <span class="keywordtype">int</span> field_no);00572 00573 00574 <span class="keyword">typedef</span> <span class="keyword">struct </span>cli_table_descriptor {00575     <span class="keywordtype">char</span> <span class="keyword">const</span>*       name;00576 } cli_table_descriptor;00577 00578 <span class="comment">/*********************************************************************</span>00579 <span class="comment"> * cli_show_tables</span>00580 <span class="comment"> *     Show all tables of specified database</span>00581 <span class="comment"> * Parameters:</span>00582 <span class="comment"> *     session - session descriptor as returned by cli_open</span>00583 <span class="comment"> *     tables  - address of the pointer to the array of tables descriptors,</span>00584 <span class="comment"> *               this array should be later deallocated by application by cli_free_memory()</span>00585 <span class="comment"> * Returns:</span>00586 <span class="comment"> *     &gt;= 0 - number of tables in the database (Metatable is not returned/counted)</span>00587 <span class="comment"> *     &lt; 0  - result code as described in cli_result_code enum</span>00588 <span class="comment"> */</span>00589 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_show_tables(<span class="keywordtype">int</span> session, cli_table_descriptor** tables);00590 00591 00592 <span class="comment">/*********************************************************************</span>00593 <span class="comment"> * cli_create_table</span>00594 <span class="comment"> *     Create new table</span>00595 <span class="comment"> * Parameters:</span>00596 <span class="comment"> *     session   - session descriptor as returned by cli_open</span>00597 <span class="comment"> *     tableName - name of new table</span>00598 <span class="comment"> *     nFields   - number of columns in the table</span>00599 <span class="comment"> *     fields    - array with table columns descriptors</span>00600 <span class="comment"> * Returns:</span>00601 <span class="comment"> *     result code as described in cli_result_code enum</span>00602 <span class="comment"> */</span>00603 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_create_table(<span class="keywordtype">int</span> session, <span class="keywordtype">char</span> <span class="keyword">const</span>* tableName, <span class="keywordtype">int</span> nFields, 00604                                         cli_field_descriptor* fields);00605 00606 <span class="comment">/*********************************************************************</span>00607 <span class="comment"> * cli_alter_table</span>00608 <span class="comment"> *     Change table format</span>00609 <span class="comment"> * Parameters:</span>00610 <span class="comment"> *     session   - session descriptor as returned by cli_open</span>00611 <span class="comment"> *     tableName - name of existing table</span>00612 <span class="comment"> *     nFields   - number of columns in the table</span>00613 <span class="comment"> *     fields    - array with new table columns descriptors</span>00614 <span class="comment"> * Returns:</span>00615 <span class="comment"> *     result code as described in cli_result_code enum</span>00616 <span class="comment"> */</span>00617 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_alter_table(<span class="keywordtype">int</span> session, <span class="keywordtype">char</span> <span class="keyword">const</span>* tableName, <span class="keywordtype">int</span> nFields, 00618                                      cli_field_descriptor* fields);00619 00620 <span class="comment">/*********************************************************************</span>00621 <span class="comment"> * cli_drop_table</span>00622 <span class="comment"> *     drop the table</span>00623 <span class="comment"> * Parameters:</span>00624 <span class="comment"> *     session   - session descriptor as returned by cli_open</span>00625 <span class="comment"> *     tableName - name of deleted table</span>00626 <span class="comment"> * Returns:</span>00627 <span class="comment"> *     result code as described in cli_result_code enum</span>00628 <span class="comment"> */</span>00629 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_drop_table(<span class="keywordtype">int</span> session, <span class="keywordtype">char</span> <span class="keyword">const</span>* tableName);00630 00631 00632 <span class="comment">/*********************************************************************</span>00633 <span class="comment"> * cli_alter_index</span>00634 <span class="comment"> *     add or remove column index</span>00635 <span class="comment"> * Parameters:</span>00636 <span class="comment"> *     session   - session descriptor as returned by cli_open</span>00637 <span class="comment"> *     tableName - name of the table</span>00638 <span class="comment"> *     fieldName - name of field</span>00639 <span class="comment"> *     newFlags  - new flags of the field, if index exists for this field, but is not specified in </span>00640 <span class="comment"> *                 &lt;code&gt;newFlags&lt;/code&gt; mask, then it will be removed; if index not exists, but is </span>00641 <span class="comment"> *                 specified in &lt;code&gt;newFlags&lt;/code&gt; mask, then it will be created. *                   </span>00642 <span class="comment"> * Returns:</span>00643 <span class="comment"> *     result code as described in cli_result_code enum</span>00644 <span class="comment"> */</span>00645 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_alter_index(<span class="keywordtype">int</span> session, <span class="keywordtype">char</span> <span class="keyword">const</span>* tableName, <span class="keywordtype">char</span> <span class="keyword">const</span>* fieldName, 00646                                      <span class="keywordtype">int</span> newFlags);00647 00648 00649 <span class="comment">/*********************************************************************</span>00650 <span class="comment"> * cli_set_error_handler</span>00651 <span class="comment"> *     Set FastDB erro handler. Handler should be no-return function which perform stack unwind.</span>00652 <span class="comment"> * Parameters:</span>00653 <span class="comment"> *     session   - session descriptor as returned by cli_open</span>00654 <span class="comment"> *     handler   - error handler</span>00655 <span class="comment"> *     context   - error handler context: pointer to the user specific data</span>00656 <span class="comment"> *                  which will be passed to thr handler</span>00657 <span class="comment"> * Returns:</span>00658 <span class="comment"> *     previous handler</span>00659 <span class="comment"> */</span>00660 <span class="keyword">enum</span> cli_error_class { 00661     cli_no_error, 00662     cli_query_error,00663     cli_arithmetic_error,00664     cli_index_out_of_range_error,00665     cli_database_open_error,00666     cli_file_error,00667     cli_out_of_memory_error,00668     cli_deadlock,

⌨️ 快捷键说明

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