没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
QNX
®
Software Development Platform 6.6
QNX
®
Software Development Platform 6.6
QDB Developer's Guide
©
2001–2014, QNX Software Systems Limited, a subsidiary of BlackBerry. All
rights reserved.
QNX Software Systems Limited
1001 Farrar Road
Ottawa, Ontario
K2K 0B3
Canada
Voice: +1 613 591-0931
Fax: +1 613 591-3579
Email: info@qnx.com
Web: http://www.qnx.com/
QNX, QNX CAR, Neutrino, Momentics, Aviage, and Foundry27 are trademarks
of BlackBerry Limited that are registered and/or used in certain jurisdictions,
and used under license by QNX Software Systems Limited. All other trademarks
belong to their respective owners.
Electronic edition published: Thursday, February 20, 2014
Table of Contents
About This Guide .......................................................................................................................7
Typographical conventions .................................................................................................8
Technical support ...........................................................................................................10
Chapter 1: Getting Started with QDB .........................................................................................11
Starting the QDB server ...................................................................................................12
Loading QDB databases ...................................................................................................13
Unloading QDB databases ...............................................................................................14
PPS configuration path ...................................................................................................15
Database configuration objects ........................................................................................17
Database storage ............................................................................................................22
Schema files ..................................................................................................................23
Summary of database files ...............................................................................................24
Chapter 2: QDB Command Line .................................................................................................25
Temporary storage filesystem ...........................................................................................29
Database integrity testing ................................................................................................30
Sharing connections between clients ................................................................................31
Shared caching ..............................................................................................................32
Advantages of shared caching .................................................................................32
Database recovery ...........................................................................................................33
Busy timeout ..................................................................................................................35
Handling corrupt databases .............................................................................................36
Chapter 3: QDB Client ..............................................................................................................39
Backing up and restoring databases ..................................................................................42
Chapter 4: QDB Examples .........................................................................................................43
Connecting to a database ................................................................................................44
Using asynchronous mode ......................................................................................44
Executing a statement .....................................................................................................45
Getting the result of a query ............................................................................................46
Using a result .................................................................................................................47
Disconnecting from the server ..........................................................................................48
Sample program .............................................................................................................49
Chapter 5: Datatypes in QDB ....................................................................................................51
Storage classes ...............................................................................................................52
Column affinity ...............................................................................................................53
QDB Developer's Guide
Determination of column affinity .............................................................................53
Column affinity example ........................................................................................54
Comparison expressions ..................................................................................................55
Comparison example ..............................................................................................56
Operators .......................................................................................................................57
Sorting, grouping and compound SELECT statements ........................................................58
Other affinity modes .......................................................................................................59
User-defined collation sequences .....................................................................................60
Assigning collation sequences from SQL ..................................................................60
Collation sequences example ..................................................................................61
Chapter 6: QDB Virtual Machine Opcodes ...................................................................................63
Instruction format and execution ......................................................................................64
Virtual machine features ..................................................................................................65
Viewing programs generated by QDB .................................................................................66
The opcodes ...................................................................................................................68
Chapter 7: Writing User-Defined Functions .................................................................................93
User scalar/aggregate functions ........................................................................................94
User collation routines ....................................................................................................96
Collation algorithm example .............................................................................................99
SQLite C/C++ API .........................................................................................................100
sqlite3_result_* ..................................................................................................100
sqlite3_value_* ...................................................................................................101
sqlite3_user_data ................................................................................................103
Chapter 8: QDB API Reference ................................................................................................105
qdb_backup() ...............................................................................................................106
qdb_bkcancel() .............................................................................................................108
qdb_cell() ....................................................................................................................110
qdb_cell_length() ..........................................................................................................112
qdb_cell_type() .............................................................................................................114
qdb_collation() .............................................................................................................116
qdb_column_decltype() .................................................................................................118
qdb_column_index() .....................................................................................................120
qdb_column_name() .....................................................................................................122
qdb_columns() .............................................................................................................124
qdb_connect() ..............................................................................................................125
qdb_data_source() ........................................................................................................127
qdb_disconnect() ..........................................................................................................129
qdb_freeresult() ............................................................................................................130
qdb_getdbsize() ............................................................................................................131
qdb_geterrcode() ..........................................................................................................133
qdb_geterrmsg() ...........................................................................................................135
Table of Contents
qdb_getoption() ............................................................................................................137
qdb_getresult() .............................................................................................................139
qdb_gettransstate() .......................................................................................................141
qdb_interrupt() .............................................................................................................143
qdb_last_insert_rowid() .................................................................................................145
qdb_mprintf() ...............................................................................................................147
qdb_parameters() .........................................................................................................150
qdb_printmsg() .............................................................................................................152
qdb_query() .................................................................................................................154
qdb_rowchanges() .........................................................................................................156
qdb_rows() ...................................................................................................................158
qdb_setbusytimeout() ....................................................................................................159
qdb_setoption() ............................................................................................................161
qdb_snprintf() ..............................................................................................................163
qdb_statement() ...........................................................................................................165
qdb_stmt_decltypes() ....................................................................................................167
qdb_stmt_exec() ...........................................................................................................170
qdb_stmt_free() ............................................................................................................174
qdb_stmt_init() .............................................................................................................176
qdb_vacuum() ..............................................................................................................178
qdb_vmprintf() .............................................................................................................180
Chapter 9: QDB SQL Reference ...............................................................................................183
Row ID and Autoincrement ............................................................................................184
Comments ...................................................................................................................186
Expressions ..................................................................................................................187
Keywords .....................................................................................................................195
Statements ..................................................................................................................200
ALTER TABLE .....................................................................................................200
ANALYZE ............................................................................................................201
ATTACH DATABASE .............................................................................................202
CREATE INDEX ...................................................................................................203
CREATE TABLE ...................................................................................................204
CREATE TRIGGER ...............................................................................................207
CREATE VIEW .....................................................................................................210
DELETE .............................................................................................................210
DETACH DATABASE ............................................................................................211
DROP INDEX ......................................................................................................211
DROP TABLE ......................................................................................................212
DROP TRIGGER ..................................................................................................212
DROP VIEW ........................................................................................................212
EXPLAIN ............................................................................................................213
INSERT ..............................................................................................................213
ON CONFLICT .....................................................................................................214
QDB Developer's Guide
剩余235页未读,继续阅读
资源评论
hushuo0428
- 粉丝: 2
- 资源: 33
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功