public static sqlite3_blob blob_open(this sqlite3 db, utf8z db_utf8, utf8z table_utf8, utf8z column_utf8, long rowid, int flags) { sqlite3_blob blob; int rc = raw.sqlite3_blob_open(db, db_utf8, table_utf8, column_utf8, rowid, flags, out blob); check_ok(rc); return(blob); }
public static SafeSqliteBlobHandle sqlite3_blob_open(SafeSqliteHandle db, utf8z sdb, utf8z table, utf8z col, long rowid, int flags, out Result result) { using var _ = db.Lease(); result = (Result)raw.sqlite3_blob_open(db.DangerousGetWrapper(), sdb, table, col, rowid, flags, out var wrapper); if (result != (int)Result.OK) { wrapper = null; } try { // Always return a non-null handle to match default P/Invoke marshaling behavior. SafeHandle.IsInvalid // will be true when the handle is not usable, but the handle instance can be disposed either way. return(new SafeSqliteBlobHandle(db, wrapper)); } catch { raw.sqlite3_blob_close(wrapper); throw; } }
public static void result_text(this sqlite3_context ctx, utf8z s) { raw.sqlite3_result_text(ctx, s); }
public static void bind_text(this sqlite3_stmt stmt, int index, utf8z s) { int rc = raw.sqlite3_bind_text(stmt, index, s); check_ok(rc); }