嵌入式NoSQL引擎
打开数据库,
可选使用参数二用 UNQLITE_OPEN 前缀常量指定选项
默认为 _UNQLITE_OPEN_CREATE
unqlite版本
追加值到指定键
格式化参数为可选参数
成功返回0,失败返回非0
开始事务
成功返回0,失败返回非0
提交事务
成功返回0,失败返回非0
编译jx9脚本,
参数可以是脚本代码或脚本文件路径
返回错误信息
创建游标
删除键值
如果不指定回调函数,直接返回查询结果
失败返回空值
unqliteObject.fetch("/*键名*/",function( value ){
io.print( "查询返回", value )
} )
如果不指定回调函数,直接返回对象
失败返回空值
unqliteObject.fetchObject("/*键名*/",function( tab ){
io.print( "查询返回对象", tab )
} )
回滚事务
成功返回0,失败返回非0
写入键值
格式化参数为可选参数
成功返回0,失败返回非0
存储文件到数据库
成功返回0,失败返回非0
写入表对象
成功返回0,失败返回非0
_SXERR_ABORT=-10
_SXERR_BIG=-32
_SXERR_BUSY=-14
_SXERR_CONTINUE=-25
_SXERR_CORRUPT=-24
_SXERR_DONE=-28
_SXERR_EMPTY=-3
_SXERR_EOF=-18
_SXERR_EXISTS=-11
_SXERR_FORMAT=-21
_SXERR_IGNORE=-63
_SXERR_INVALID=-9
_SXERR_IO=-2
_SXERR_LIMIT=-7
_SXERR_LOCKED=-4
_SXERR_MEM=-1
_SXERR_MORE=-8
_SXERR_NEXT=-22
_SXERR_NOMATCH=-26
_SXERR_NOOP=-20
_SXERR_NOTFOUND=-6
_SXERR_NOTIMPLEMENTED=-17
_SXERR_ORANGE=-5
_SXERR_OS=-23
_SXERR_OVERFLOW=-15
_SXERR_PATH=-30
_SXERR_PERM=-19
_SXERR_RESET=-27
_SXERR_RETRY=-33
_SXERR_SHORT=-29
_SXERR_SYNTAX=-12
_SXERR_TIMEOUT=-31
_SXERR_UNKNOWN=-13
_SXERR_WILLBLOCK=-16
_SXRET_OK=0
_UNQLITE_ABORT=-10
_UNQLITE_BUSY=-14
_UNQLITE_CANTOPEN=-74
_UNQLITE_COMPILE_ERR=-70
_UNQLITE_CONFIG_DISABLE_AUTO_COMMIT=5
_UNQLITE_CONFIG_ERR_LOG=3
_UNQLITE_CONFIG_GET_KV_NAME=6
_UNQLITE_CONFIG_JX9_ERR_LOG=1
_UNQLITE_CONFIG_KV_ENGINE=4
_UNQLITE_CONFIG_MAX_PAGE_CACHE=2
_UNQLITE_CORRUPT=-24
_UNQLITE_DONE=-28
_UNQLITE_EMPTY=-3
_UNQLITE_EOF=-18
_UNQLITE_EXISTS=-11
_UNQLITE_FULL=-73
_UNQLITE_INVALID=-9
_UNQLITE_IOERR=-2
_UNQLITE_KV_CONFIG_CMP_FUNC=2
_UNQLITE_KV_CONFIG_HASH_FUNC=1
_UNQLITE_LIB_CONFIG_MEM_ERR_CALLBACK=2
_UNQLITE_LIB_CONFIG_PAGE_SIZE=8
_UNQLITE_LIB_CONFIG_STORAGE_ENGINE=7
_UNQLITE_LIB_CONFIG_THREAD_LEVEL_MULTI=5
_UNQLITE_LIB_CONFIG_THREAD_LEVEL_SINGLE=4
_UNQLITE_LIB_CONFIG_USER_MALLOC=1
_UNQLITE_LIB_CONFIG_USER_MUTEX=3
_UNQLITE_LIB_CONFIG_VFS=6
_UNQLITE_LIMIT=-7
_UNQLITE_LOCKED=-4
_UNQLITE_LOCKERR=-76
_UNQLITE_LOCK_EXCLUSIVE=4
_UNQLITE_LOCK_NONE=0
_UNQLITE_LOCK_PENDING=3
_UNQLITE_LOCK_RESERVED=2
_UNQLITE_LOCK_SHARED=1
_UNQLITE_NOMEM=-1
_UNQLITE_NOOP=-20
_UNQLITE_NOTFOUND=-6
_UNQLITE_NOTIMPLEMENTED=-17
_UNQLITE_OK=0
_UNQLITE_OPEN_CREATE=4
_UNQLITE_OPEN_EXCLUSIVE=8
_UNQLITE_OPEN_IN_MEMORY=0x80
_UNQLITE_OPEN_MMAP=0x100
_UNQLITE_OPEN_NOMUTEX=0x20
_UNQLITE_OPEN_OMIT_JOURNALING=0x40
_UNQLITE_OPEN_READONLY=1
_UNQLITE_OPEN_READWRITE=2
_UNQLITE_OPEN_TEMP_DB=0x10
_UNQLITE_PERM=-19
_UNQLITE_READ_ONLY=-75
_UNQLITE_SYNC_DATAONLY=0x10
_UNQLITE_SYNC_FULL=3
_UNQLITE_SYNC_NORMAL=2
_UNQLITE_UNKNOWN=-13
_UNQLITE_VM_CONFIG_ARGV_ENTRY=0xC
_UNQLITE_VM_CONFIG_CREATE_VAR=6
_UNQLITE_VM_CONFIG_ENV_ATTR=9
_UNQLITE_VM_CONFIG_ERR_REPORT=3
_UNQLITE_VM_CONFIG_EXEC_VALUE=0xA
_UNQLITE_VM_CONFIG_EXTRACT_OUTPUT=0xD
_UNQLITE_VM_CONFIG_HTTP_REQUEST=7
_UNQLITE_VM_CONFIG_IMPORT_PATH=2
_UNQLITE_VM_CONFIG_IO_STREAM=0xB
_UNQLITE_VM_CONFIG_OUTPUT=1
_UNQLITE_VM_CONFIG_RECURSION_DEPTH=4
_UNQLITE_VM_CONFIG_SERVER_ATTR=8
_UNQLITE_VM_ERR=-71
_UNQLITE_VM_OUTPUT_LENGTH=5