📄 cli_8h-source.html
字号:
00669 cli_null_reference_error,00670 cli_lock_revoked,00671 cli_file_limit_exeeded 00672 };00673 <span class="keyword">typedef</span> void (CLI_CALLBACK_CC *cli_error_handler)(<span class="keywordtype">int</span> error, <span class="keywordtype">char</span> <span class="keyword">const</span>* msg, <span class="keywordtype">int</span> msgarg, <span class="keywordtype">void</span>* context); 00674 cli_error_handler FASTDB_DLL_ENTRY cli_set_error_handler(<span class="keywordtype">int</span> session, cli_error_handler new_handler, <span class="keywordtype">void</span>* context);00675 00676 <span class="comment">/*********************************************************************</span>00677 <span class="comment"> * cli_freeze</span>00678 <span class="comment"> * Freeze cursor. Make it possible to reused cursor after commit of the current transaction.</span>00679 <span class="comment"> * Parameters:</span>00680 <span class="comment"> * statement - statememt descriptor returned by cli_statement</span>00681 <span class="comment"> * Returns:</span>00682 <span class="comment"> * result code as described in cli_result_code enum</span>00683 <span class="comment"> */</span>00684 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_freeze(<span class="keywordtype">int</span> statement);00685 00686 <span class="comment">/*********************************************************************</span>00687 <span class="comment"> * cli_unfreeze</span>00688 <span class="comment"> * Unfreeze cursor. Reuse previously frozen cursor.</span>00689 <span class="comment"> * Parameters:</span>00690 <span class="comment"> * statement - statememt descriptor returned by cli_statement</span>00691 <span class="comment"> * Returns:</span>00692 <span class="comment"> * result code as described in cli_result_code enum</span>00693 <span class="comment"> */</span>00694 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_unfreeze(<span class="keywordtype">int</span> statement);00695 00696 00697 <span class="comment">/*********************************************************************</span>00698 <span class="comment"> * cli_attach</span>00699 <span class="comment"> * Attach thread to the database. Each thread except one opened the database should first</span>00700 <span class="comment"> * attach to the database before any access to the database, and detach after end of the work with database</span>00701 <span class="comment"> * Parameters:</span>00702 <span class="comment"> * session - session descriptor returned by cli_open</span>00703 <span class="comment"> * Returns:</span>00704 <span class="comment"> * result code as described in cli_result_code enum</span>00705 <span class="comment"> */</span>00706 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_attach(<span class="keywordtype">int</span> session);00707 00708 <span class="comment">/*********************************************************************</span>00709 <span class="comment"> * cli_detach</span>00710 <span class="comment"> * Detach thread from the database. Each thread except one opened the database should perform </span>00711 <span class="comment"> * attach to the database before any access to the database, and detach after end of the work with database</span>00712 <span class="comment"> * Parameters:</span>00713 <span class="comment"> * session - session descriptor returned by cli_open</span>00714 <span class="comment"> * detach_mode - bit mask representing detach mode</span>00715 <span class="comment"> * Returns:</span>00716 <span class="comment"> * result code as described in cli_result_code enum</span>00717 <span class="comment"> */</span>00718 <span class="keyword">enum</span> cli_detach_mode {00719 cli_commit_on_detach = 1,00720 cli_destroy_context_on_detach = 200721 };00722 00723 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_detach(<span class="keywordtype">int</span> session, <span class="keywordtype">int</span> detach_mode);00724 00725 00726 <span class="comment">/*********************************************************************</span>00727 <span class="comment"> * cli_free_memory</span>00728 <span class="comment"> * Free memory allocated by cli_show_tables and cli_describe</span>00729 <span class="comment"> * Parameters:</span>00730 <span class="comment"> * session - session descriptor returned by cli_open</span>00731 <span class="comment"> * ptr - pointer to the allocated buffer</span>00732 <span class="comment"> */</span>00733 <span class="keywordtype">void</span> FASTDB_DLL_ENTRY cli_free_memory(<span class="keywordtype">int</span> session, <span class="keywordtype">void</span>* ptr);00734 00735 00736 <span class="keyword">typedef</span> <span class="keyword">struct </span>cli_database_monitor {00737 <span class="keywordtype">int</span> n_readers;00738 <span class="keywordtype">int</span> n_writers;00739 <span class="keywordtype">int</span> n_blocked_readers;00740 <span class="keywordtype">int</span> n_blocked_writers;00741 <span class="keywordtype">int</span> n_users;00742 } cli_database_monitor;00743 00744 <span class="comment">/*********************************************************************</span>00745 <span class="comment"> * cli_get_database_state</span>00746 <span class="comment"> * Obtain information about current state of the database</span>00747 <span class="comment"> * Parameters:</span>00748 <span class="comment"> * session - session descriptor returned by cli_open</span>00749 <span class="comment"> * monitor - pointer to the monitor structure. The folloing fields are set:</span>00750 <span class="comment"> * n_readers: number of granted shared locks</span>00751 <span class="comment"> * n_writers: number of granted exclusive locks</span>00752 <span class="comment"> * n_blocked_reader: number of threads which shared lock request was blocked</span>00753 <span class="comment"> * n_blocked_writers: number of threads which exclusive lock request was blocked</span>00754 <span class="comment"> * n_users: number of processes openned the database</span>00755 <span class="comment"> * Returns:</span>00756 <span class="comment"> * result code as described in cli_result_code enum</span>00757 <span class="comment"> */</span>00758 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_get_database_state(<span class="keywordtype">int</span> session, cli_database_monitor* monitor);00759 00760 00761 00762 <span class="comment">/*********************************************************************</span>00763 <span class="comment"> * cli_set_trace_function</span>00764 <span class="comment"> * Set trace function which will be used to output FastDB trace messages</span>00765 <span class="comment"> * Parameters:</span>00766 <span class="comment"> * func - pointer to trace function which receives trace message terminated with new line character</span>00767 <span class="comment"> */</span>00768 <span class="keyword">typedef</span> void (CLI_CALLBACK_CC *cli_trace_function_t)(<span class="keywordtype">char</span>* msg);00769 <span class="keywordtype">void</span> FASTDB_DLL_ENTRY cli_set_trace_function(cli_trace_function_t func);00770 00771 00772 <span class="comment">/*********************************************************************</span>00773 <span class="comment"> * cli_prepare_query</span>00774 <span class="comment"> * Prepare SubSQL query statement. </span>00775 <span class="comment"> * Parameters:</span>00776 <span class="comment"> * session - session descriptor returned by cli_open</span>00777 <span class="comment"> * query - query string with optional parameters. Parameters are specified</span>00778 <span class="comment"> * as '%T' where T is one or two character code of parameter type using the same notation</span>00779 <span class="comment"> * as in printf: %d or %i - int, %f - float or double, %ld - int8, %s - string, %p - oid...</span>00780 <span class="comment"> * Parameter of cli_rectangle_t* type has format %R, cli_time_t type - %t</span>00781 <span class="comment"> * Returns:</span>00782 <span class="comment"> * >= 0 - statement descriptor</span>00783 <span class="comment"> * < 0 - error code as described in cli_result_code enum</span>00784 <span class="comment"> */</span>00785 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_prepare_query(<span class="keywordtype">int</span> session, <span class="keywordtype">char</span> <span class="keyword">const</span>* query);00786 00799 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_execute_query(<span class="keywordtype">int</span> statement, <span class="keywordtype">int</span> for_update, <span class="keywordtype">void</span>* record_struct, ...);00800 00812 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_insert_struct(<span class="keywordtype">int</span> session, <span class="keywordtype">char</span> <span class="keyword">const</span>* table_name, <span class="keywordtype">void</span>* record_struct, cli_oid_t* oid);00813 00814 <span class="keyword">typedef</span> <span class="keywordtype">void</span>* cli_transaction_context_t;00815 <span class="comment">/*********************************************************************</span>00816 <span class="comment"> * cli_create_transaction_context</span>00817 <span class="comment"> * Create new transaction xontext which can be used in cli_join_transaction function</span>00818 <span class="comment"> * Parameters:</span>00819 <span class="comment"> * Returns:</span>00820 <span class="comment"> * created transaction context</span>00821 <span class="comment"> */</span>00822 cli_transaction_context_t FASTDB_DLL_ENTRY cli_create_transaction_context();00823 00824 <span class="comment">/*********************************************************************</span>00825 <span class="comment"> * cli_join_transaction</span>00826 <span class="comment"> * Associate current threads with specified transaction context,</span>00827 <span class="comment"> * It allows to share single transaction between multiple threads.</span>00828 <span class="comment"> * Parameters:</span>00829 <span class="comment"> * session - session descriptor returned by cli_open</span>00830 <span class="comment"> * ctx - transaction context created by cli_create_transaction_context</span>00831 <span class="comment"> * Returns:</span>00832 <span class="comment"> * result code as described in cli_result_code enum</span>00833 <span class="comment"> */</span>00834 <span class="keywordtype">int</span> FASTDB_DLL_ENTRY cli_join_transaction(<span class="keywordtype">int</span> session, cli_transaction_context_t ctx);00835 00836 <span class="comment">/*********************************************************************</span>00837 <span class="comment"> * cli_remove_transaction_context</span>00838 <span class="comment"> * Remove transaction context</span>00839 <span class="comment"> * Parameters:</span>00840 <span class="comment"> * ctx transaction context created by cli_create_transaction_context</span>00841 <span class="comment"> */</span>00842 <span class="keywordtype">void</span> FASTDB_DLL_ENTRY cli_remove_transaction_context(cli_transaction_context_t ctx);00843 00844 <span class="preprocessor">#ifdef __cplusplus</span>00845 <span class="preprocessor"></span>}00846 <span class="preprocessor">#endif</span>00847 <span class="preprocessor"></span>00848 <span class="preprocessor">#endif</span>00849 <span class="preprocessor"></span>00850 </pre></div><hr><address style="align: right;"><small>Generated on Mon Oct 23 13:23:57 2006 for FastDB by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -