|
| 1 | +import 'dart:js_interop'; |
| 2 | + |
| 3 | +import 'js_interop.dart'; |
| 4 | + |
| 5 | +// ignore_for_file: non_constant_identifier_names |
| 6 | +typedef Pointer = int; |
| 7 | + |
| 8 | +/// Typed wrappers around the symbols exported by SQLite. |
| 9 | +/// |
| 10 | +/// Generated by `tool/generate_bindings.dart`. |
| 11 | +extension type SqliteExports(JSObject raw) implements JSObject { |
| 12 | + external Global get sqlite3_temp_directory; |
| 13 | + external JSFunction? get sqlite3_initialize; |
| 14 | + external int sqlite3_open_v2( |
| 15 | + Pointer/*<struct sqlite3_char *>*/ filename, |
| 16 | + Pointer/*<struct sqlite3 * *>*/ ppDb, |
| 17 | + int flags, |
| 18 | + Pointer/*<struct sqlite3_char *>*/ zVfs); |
| 19 | + external int sqlite3_close_v2(Pointer/*<struct sqlite3 *>*/ db); |
| 20 | + external int sqlite3_extended_result_codes( |
| 21 | + Pointer/*<struct sqlite3 *>*/ db, int onoff); |
| 22 | + external int sqlite3_extended_errcode(Pointer/*<struct sqlite3 *>*/ db); |
| 23 | + external Pointer/*<struct sqlite3_char *>*/ sqlite3_errmsg( |
| 24 | + Pointer/*<struct sqlite3 *>*/ db); |
| 25 | + external Pointer/*<struct sqlite3_char *>*/ sqlite3_errstr(int code); |
| 26 | + external JSFunction? get sqlite3_error_offset; |
| 27 | + external void sqlite3_free(Pointer/*<void *>*/ ptr); |
| 28 | + external Pointer/*<struct sqlite3_char *>*/ sqlite3_libversion(); |
| 29 | + external Pointer/*<struct sqlite3_char *>*/ sqlite3_sourceid(); |
| 30 | + external int sqlite3_libversion_number(); |
| 31 | + external JSBigInt sqlite3_last_insert_rowid(Pointer/*<struct sqlite3 *>*/ db); |
| 32 | + external int sqlite3_changes(Pointer/*<struct sqlite3 *>*/ db); |
| 33 | + external int sqlite3_exec( |
| 34 | + Pointer/*<struct sqlite3 *>*/ db, |
| 35 | + Pointer/*<struct sqlite3_char *>*/ sql, |
| 36 | + Pointer/*<void *>*/ callback, |
| 37 | + Pointer/*<void *>*/ argToCb, |
| 38 | + Pointer/*<struct sqlite3_char * *>*/ errorOut); |
| 39 | + external int sqlite3_get_autocommit(Pointer/*<struct sqlite3 *>*/ db); |
| 40 | + external int sqlite3_prepare_v2( |
| 41 | + Pointer/*<struct sqlite3 *>*/ db, |
| 42 | + Pointer/*<struct sqlite3_char *>*/ zSql, |
| 43 | + int nByte, |
| 44 | + Pointer/*<struct sqlite3_stmt * *>*/ ppStmt, |
| 45 | + Pointer/*<struct sqlite3_char * *>*/ pzTail); |
| 46 | + external int sqlite3_prepare_v3( |
| 47 | + Pointer/*<struct sqlite3 *>*/ db, |
| 48 | + Pointer/*<struct sqlite3_char *>*/ zSql, |
| 49 | + int nByte, |
| 50 | + int prepFlags, |
| 51 | + Pointer/*<struct sqlite3_stmt * *>*/ ppStmt, |
| 52 | + Pointer/*<struct sqlite3_char * *>*/ pzTail); |
| 53 | + external int sqlite3_finalize(Pointer/*<struct sqlite3_stmt *>*/ pStmt); |
| 54 | + external int sqlite3_step(Pointer/*<struct sqlite3_stmt *>*/ pStmt); |
| 55 | + external int sqlite3_reset(Pointer/*<struct sqlite3_stmt *>*/ pStmt); |
| 56 | + external int sqlite3_stmt_isexplain(Pointer/*<struct sqlite3_stmt *>*/ pStmt); |
| 57 | + external int sqlite3_stmt_readonly(Pointer/*<struct sqlite3_stmt *>*/ pStmt); |
| 58 | + external int sqlite3_column_count(Pointer/*<struct sqlite3_stmt *>*/ pStmt); |
| 59 | + external int sqlite3_bind_parameter_count( |
| 60 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt); |
| 61 | + external int sqlite3_bind_parameter_index( |
| 62 | + Pointer/*<struct sqlite3_stmt *>*/ arg0, |
| 63 | + Pointer/*<struct sqlite3_char *>*/ zName); |
| 64 | + external Pointer/*<struct sqlite3_char *>*/ sqlite3_column_name( |
| 65 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int N); |
| 66 | + external int sqlite3_bind_blob64( |
| 67 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, |
| 68 | + int index, |
| 69 | + Pointer/*<void *>*/ data, |
| 70 | + JSBigInt length, |
| 71 | + Pointer/*<void *>*/ destructor); |
| 72 | + external int sqlite3_bind_double( |
| 73 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int index, double data); |
| 74 | + external int sqlite3_bind_int64( |
| 75 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int index, JSBigInt data); |
| 76 | + external int sqlite3_bind_null( |
| 77 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int index); |
| 78 | + external int sqlite3_bind_text( |
| 79 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, |
| 80 | + int index, |
| 81 | + Pointer/*<struct sqlite3_char *>*/ data, |
| 82 | + int length, |
| 83 | + Pointer/*<void *>*/ destructor); |
| 84 | + external Pointer/*<void *>*/ sqlite3_column_blob( |
| 85 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int iCol); |
| 86 | + external double sqlite3_column_double( |
| 87 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int iCol); |
| 88 | + external JSBigInt sqlite3_column_int64( |
| 89 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int iCol); |
| 90 | + external Pointer/*<struct sqlite3_char *>*/ sqlite3_column_text( |
| 91 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int iCol); |
| 92 | + external int sqlite3_column_bytes( |
| 93 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int iCol); |
| 94 | + external int sqlite3_column_type( |
| 95 | + Pointer/*<struct sqlite3_stmt *>*/ pStmt, int iCol); |
| 96 | + external Pointer/*<void *>*/ sqlite3_value_blob( |
| 97 | + Pointer/*<struct sqlite3_value *>*/ value); |
| 98 | + external double sqlite3_value_double( |
| 99 | + Pointer/*<struct sqlite3_value *>*/ value); |
| 100 | + external int sqlite3_value_type(Pointer/*<struct sqlite3_value *>*/ value); |
| 101 | + external JSBigInt sqlite3_value_int64( |
| 102 | + Pointer/*<struct sqlite3_value *>*/ value); |
| 103 | + external Pointer/*<struct sqlite3_char *>*/ sqlite3_value_text( |
| 104 | + Pointer/*<struct sqlite3_value *>*/ value); |
| 105 | + external int sqlite3_value_bytes(Pointer/*<struct sqlite3_value *>*/ value); |
| 106 | + external JSFunction? get sqlite3_value_subtype; |
| 107 | + external Pointer/*<void *>*/ sqlite3_aggregate_context( |
| 108 | + Pointer/*<struct sqlite3_context *>*/ ctx, int nBytes); |
| 109 | + external Pointer/*<void *>*/ sqlite3_user_data( |
| 110 | + Pointer/*<struct sqlite3_context *>*/ ctx); |
| 111 | + external void sqlite3_result_blob64( |
| 112 | + Pointer/*<struct sqlite3_context *>*/ ctx, |
| 113 | + Pointer/*<void *>*/ data, |
| 114 | + JSBigInt length, |
| 115 | + Pointer/*<void *>*/ destructor); |
| 116 | + external void sqlite3_result_double( |
| 117 | + Pointer/*<struct sqlite3_context *>*/ ctx, double result); |
| 118 | + external void sqlite3_result_error(Pointer/*<struct sqlite3_context *>*/ ctx, |
| 119 | + Pointer/*<struct sqlite3_char *>*/ msg, int length); |
| 120 | + external void sqlite3_result_int64( |
| 121 | + Pointer/*<struct sqlite3_context *>*/ ctx, JSBigInt result); |
| 122 | + external void sqlite3_result_null(Pointer/*<struct sqlite3_context *>*/ ctx); |
| 123 | + external void sqlite3_result_text( |
| 124 | + Pointer/*<struct sqlite3_context *>*/ ctx, |
| 125 | + Pointer/*<struct sqlite3_char *>*/ data, |
| 126 | + int length, |
| 127 | + Pointer/*<void *>*/ destructor); |
| 128 | + external JSFunction? get sqlite3_result_subtype; |
| 129 | + external JSFunction? get sqlite3_db_config; |
| 130 | + external int sqlite3_vfs_unregister(Pointer/*<struct sqlite3_vfs *>*/ arg0); |
| 131 | + external Pointer/*<void *>*/ dart_sqlite3_malloc(int size); |
| 132 | + external void dart_sqlite3_free(Pointer/*<void *>*/ ptr); |
| 133 | + external Pointer/*<struct sqlite3_vfs *>*/ dart_sqlite3_register_vfs( |
| 134 | + Pointer/*<char *>*/ name, int dartId, int makeDefault); |
| 135 | + external int dart_sqlite3_create_scalar_function( |
| 136 | + Pointer/*<struct sqlite3 *>*/ db, |
| 137 | + Pointer/*<char *>*/ zFunctionName, |
| 138 | + int nArg, |
| 139 | + int eTextRep, |
| 140 | + int id); |
| 141 | + external int dart_sqlite3_create_aggregate_function( |
| 142 | + Pointer/*<struct sqlite3 *>*/ db, |
| 143 | + Pointer/*<char *>*/ zFunctionName, |
| 144 | + int nArg, |
| 145 | + int eTextRep, |
| 146 | + int id); |
| 147 | + external JSFunction? get dart_sqlite3_create_window_function; |
| 148 | + external JSFunction? get dart_sqlite3_updates; |
| 149 | + external JSFunction? get dart_sqlite3_commits; |
| 150 | + external JSFunction? get dart_sqlite3_rollbacks; |
| 151 | + external JSFunction? get dart_sqlite3_create_collation; |
| 152 | + external JSFunction? get dart_sqlite3_db_config_int; |
| 153 | +} |
0 commit comments