xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
Public 成员函数 | 包属性
SQLCipher.SQLCipherPreparedStatement类 参考
类 SQLCipher.SQLCipherPreparedStatement 继承关系图:
PreparedStatement

Public 成员函数

包属性

额外继承的成员函数

详细描述

在文件 sqlcipher.xcsm267 行定义.

构造及析构函数说明

◆ SQLCipherPreparedStatement() [1/2]

SQLCipherPreparedStatement ( SQLCipher  db,
String  sql 
)

在文件 sqlcipher.xcsm277 行定义.

引用了 SQLCipher.prepare().

◆ SQLCipherPreparedStatement() [2/2]

SQLCipherPreparedStatement ( SQLCipher  db)

在文件 sqlcipher.xcsm283 行定义.

283 {
284 sqlite = db;
285 }

成员函数说明

◆ close()

void close ( )
override

实现了 Statement.

在文件 sqlcipher.xcsm332 行定义.

332 {
333 if (nstmt != 0){
334 Native.sqlite3_finalize(nstmt);
335 nstmt = 0;
336 }
337 sqlite = nilptr;
338 }

◆ execute() [1/2]

int execute ( )
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm302 行定义.

302 {
303 int r = Native.sqlite3_step(nstmt);
304 if (101 == r){
305 return 0;
306 }
307 return r;
308 }

◆ execute() [2/2]

int execute ( String  sql)
override

实现了 Statement.

在文件 sqlcipher.xcsm287 行定义.

287 {
288 return sqlite.execute(sql);
289 }
int execute(String stmt)

引用了 SQLCipher.execute().

◆ executeQuery() [1/2]

Sql.ResultSet executeQuery ( )
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm310 行定义.

310 {
311 return new SQLCipherResultSet(sqlite, this);
312 }

◆ executeQuery() [2/2]

Sql.ResultSet executeQuery ( String  sql)
override

实现了 Statement.

在文件 sqlcipher.xcsm314 行定义.

314 {
315 nstmt = sqlite.prepare(sql);
316 return new SQLCipherResultSet(sqlite, this);
317 }

引用了 SQLCipher.prepare().

◆ executeUpdate() [1/2]

int executeUpdate ( )
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm294 行定义.

294 {
295 int r = Native.sqlite3_step(nstmt);
296 if (101 == r){
297 return 0;
298 }
299 return r;
300 }

◆ executeUpdate() [2/2]

int executeUpdate ( String  sql)
override

实现了 Statement.

在文件 sqlcipher.xcsm319 行定义.

319 {
320 return sqlite.execute(sql);
321 }

引用了 SQLCipher.execute().

◆ get_changes()

int get_changes ( )
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm323 行定义.

323 {
324 return sqlite.get_changes();
325 }
int get_changes()

引用了 SQLCipher.get_changes().

◆ getHandle()

long getHandle ( )

在文件 sqlcipher.xcsm273 行定义.

273 {
274 return nstmt;
275 }

◆ getResult()

Sql.ResultSet getResult ( )
override

实现了 Statement.

在文件 sqlcipher.xcsm327 行定义.

327 {
328 throw new Sql.DatabaseNotSupportException("getResult");
329 return nilptr;
330 }
Definition xsql.xcs:3

◆ reset()

bool reset ( )

在文件 sqlcipher.xcsm291 行定义.

291 {
292 return Native.sqlite3_reset(nstmt) == 0;
293 }

◆ setValue() [1/10]

void setValue ( byte  value)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm370 行定义.

370 {
371 int res = Native.sqlite3_bind_int(nstmt, ++param_pos, value);
372 if (0 != res){
374 }
375 }
void throw_sqlite_error()

引用了 SQLCipher.throw_sqlite_error().

◆ setValue() [2/10]

void setValue ( double  value)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm377 行定义.

377 {
378 int res = Native.sqlite3_bind_double(nstmt, ++param_pos, value);
379 if (0 != res){
381 }
382 }

引用了 SQLCipher.throw_sqlite_error().

◆ setValue() [3/10]

void setValue ( int  id,
byte  value 
)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm414 行定义.

414 {
415 int res = Native.sqlite3_bind_int(nstmt, id, value);
416 if (0 != res){
418 }
419 }

引用了 SQLCipher.throw_sqlite_error().

◆ setValue() [4/10]

void setValue ( int  id,
double  value 
)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm421 行定义.

421 {
422 int res = Native.sqlite3_bind_double(nstmt, id, value);
423 if (0 != res){
425 }
426 }

引用了 SQLCipher.throw_sqlite_error().

◆ setValue() [5/10]

void setValue ( int  id,
int  value 
)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm400 行定义.

400 {
401 int res = Native.sqlite3_bind_int(nstmt, id, value);
402 if (0 != res){
404 }
405 }

引用了 SQLCipher.throw_sqlite_error().

◆ setValue() [6/10]

void setValue ( int  id,
long  value 
)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm407 行定义.

407 {
408 int res = Native.sqlite3_bind_int64(nstmt, id, value);
409 if (0 != res){
411 }
412 }

引用了 SQLCipher.throw_sqlite_error().

◆ setValue() [7/10]

void setValue ( int  id,
String  value 
)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm385 行定义.

385 {
386 int res = 0;
387 if (value != nilptr){
388 res = Native.sqlite3_bind_text(nstmt, id, value, value.length(), nilptr);
389 if (0 != res){
391 }
392 }else{
393 res = Native.sqlite3_bind_null(nstmt, id);
394 if (0 != res){
396 }
397 }
398 }
int length()

引用了 String.length() , 以及 SQLCipher.throw_sqlite_error().

◆ setValue() [8/10]

void setValue ( int  value)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm356 行定义.

356 {
357 int res = Native.sqlite3_bind_int(nstmt, ++param_pos, value);
358 if (0 != res){
360 }
361 }

引用了 SQLCipher.throw_sqlite_error().

◆ setValue() [9/10]

void setValue ( long  value)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm363 行定义.

363 {
364 int res = Native.sqlite3_bind_int64(nstmt, ++param_pos, value);
365 if (0 != res){
367 }
368 }

引用了 SQLCipher.throw_sqlite_error().

◆ setValue() [10/10]

void setValue ( String  value)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm341 行定义.

341 {
342 int res = 0;
343 if (value != nilptr){
344 res = Native.sqlite3_bind_text(nstmt, ++param_pos, value, value.length(), nilptr);
345 if (0 != res){
347 }
348 }else{
349 res = Native.sqlite3_bind_null(nstmt, ++param_pos);
350 if (0 != res){
352 }
353 }
354 }

引用了 String.length() , 以及 SQLCipher.throw_sqlite_error().

被这些函数引用 SQLCipher.SQLCipherPreparedStatement.setValues().

◆ setValues()

void setValues ( Object []  args)
override

重载 PreparedStatement .

在文件 sqlcipher.xcsm428 行定义.

428 {
429 for (int i = 0; i < args.length; i++){
430 if (args[i].instanceOf(String)){
431 setValue((String)args[i]);
432 }else
433 if (args[i].instanceOf(int)){
434 setValue((int)args[i]);
435 }else
436 if (args[i].instanceOf(long)){
437 setValue((long)args[i]);
438 }else
439 if (args[i].instanceOf(byte)){
440 setValue((byte)args[i]);
441 }else
442 if (args[i].instanceOf(double)){
443 setValue((double)args[i]);
444 }else{
445 throw new Sql.SqlException(-1, "sql " + sql_text + " dont accept type:" + i);
446 }
447 }
448 }
void setValue(String value) override
字符串类

引用了 SQLCipher.SQLCipherPreparedStatement.setValue().

结构体成员变量说明

◆ nstmt

long nstmt = 0
package

在文件 sqlcipher.xcsm270 行定义.

◆ param_pos

int param_pos = 0
package

在文件 sqlcipher.xcsm271 行定义.

◆ sql_text

String sql_text
package

在文件 sqlcipher.xcsm269 行定义.

◆ sqlite

SQLCipher sqlite
package

在文件 sqlcipher.xcsm268 行定义.