// Generated by jextract package demo.sqlite; import java.lang.invoke.*; import java.lang.foreign.*; import java.nio.ByteOrder; import java.util.*; import java.util.function.*; import java.util.stream.*; import static java.lang.foreign.ValueLayout.*; import static java.lang.foreign.MemoryLayout.PathElement.*; public class sqlite3_h extends sqlite3_h$shared { sqlite3_h() { // Should not be called directly } static final Arena LIBRARY_ARENA = Arena.ofAuto(); static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.libraryLookup(System.mapLibraryName("sqlite3"), LIBRARY_ARENA) .or(SymbolLookup.loaderLookup()) .or(Linker.nativeLinker().defaultLookup()); private static final int SQLITE_OK = (int)0L; /** * {@snippet lang=c : * #define SQLITE_OK 0 * } */ public static int SQLITE_OK() { return SQLITE_OK; } private static final int SQLITE_ERROR = (int)1L; /** * {@snippet lang=c : * #define SQLITE_ERROR 1 * } */ public static int SQLITE_ERROR() { return SQLITE_ERROR; } private static final int SQLITE_BUSY = (int)5L; /** * {@snippet lang=c : * #define SQLITE_BUSY 5 * } */ public static int SQLITE_BUSY() { return SQLITE_BUSY; } private static final int SQLITE_CANTOPEN = (int)14L; /** * {@snippet lang=c : * #define SQLITE_CANTOPEN 14 * } */ public static int SQLITE_CANTOPEN() { return SQLITE_CANTOPEN; } private static final int SQLITE_CONSTRAINT = (int)19L; /** * {@snippet lang=c : * #define SQLITE_CONSTRAINT 19 * } */ public static int SQLITE_CONSTRAINT() { return SQLITE_CONSTRAINT; } private static final int SQLITE_ROW = (int)100L; /** * {@snippet lang=c : * #define SQLITE_ROW 100 * } */ public static int SQLITE_ROW() { return SQLITE_ROW; } private static final int SQLITE_DONE = (int)101L; /** * {@snippet lang=c : * #define SQLITE_DONE 101 * } */ public static int SQLITE_DONE() { return SQLITE_DONE; } private static final int SQLITE_OPEN_READONLY = (int)1L; /** * {@snippet lang=c : * #define SQLITE_OPEN_READONLY 1 * } */ public static int SQLITE_OPEN_READONLY() { return SQLITE_OPEN_READONLY; } private static final int SQLITE_OPEN_READWRITE = (int)2L; /** * {@snippet lang=c : * #define SQLITE_OPEN_READWRITE 2 * } */ public static int SQLITE_OPEN_READWRITE() { return SQLITE_OPEN_READWRITE; } private static final int SQLITE_OPEN_CREATE = (int)4L; /** * {@snippet lang=c : * #define SQLITE_OPEN_CREATE 4 * } */ public static int SQLITE_OPEN_CREATE() { return SQLITE_OPEN_CREATE; } private static final int SQLITE_NULL = (int)5L; /** * {@snippet lang=c : * #define SQLITE_NULL 5 * } */ public static int SQLITE_NULL() { return SQLITE_NULL; } private static class sqlite3_libversion { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_libversion"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * const char *sqlite3_libversion() * } */ public static FunctionDescriptor sqlite3_libversion$descriptor() { return sqlite3_libversion.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * const char *sqlite3_libversion() * } */ public static MethodHandle sqlite3_libversion$handle() { return sqlite3_libversion.HANDLE; } /** * Address for: * {@snippet lang=c : * const char *sqlite3_libversion() * } */ public static MemorySegment sqlite3_libversion$address() { return sqlite3_libversion.ADDR; } /** * {@snippet lang=c : * const char *sqlite3_libversion() * } */ public static MemorySegment sqlite3_libversion() { var mh$ = sqlite3_libversion.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_libversion"); } return (MemorySegment)mh$.invokeExact(); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_sourceid { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_sourceid"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * const char *sqlite3_sourceid() * } */ public static FunctionDescriptor sqlite3_sourceid$descriptor() { return sqlite3_sourceid.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * const char *sqlite3_sourceid() * } */ public static MethodHandle sqlite3_sourceid$handle() { return sqlite3_sourceid.HANDLE; } /** * Address for: * {@snippet lang=c : * const char *sqlite3_sourceid() * } */ public static MemorySegment sqlite3_sourceid$address() { return sqlite3_sourceid.ADDR; } /** * {@snippet lang=c : * const char *sqlite3_sourceid() * } */ public static MemorySegment sqlite3_sourceid() { var mh$ = sqlite3_sourceid.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_sourceid"); } return (MemorySegment)mh$.invokeExact(); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_libversion_number { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_libversion_number"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_libversion_number() * } */ public static FunctionDescriptor sqlite3_libversion_number$descriptor() { return sqlite3_libversion_number.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_libversion_number() * } */ public static MethodHandle sqlite3_libversion_number$handle() { return sqlite3_libversion_number.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_libversion_number() * } */ public static MemorySegment sqlite3_libversion_number$address() { return sqlite3_libversion_number.ADDR; } /** * {@snippet lang=c : * int sqlite3_libversion_number() * } */ public static int sqlite3_libversion_number() { var mh$ = sqlite3_libversion_number.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_libversion_number"); } return (int)mh$.invokeExact(); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_close { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_close"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_close(sqlite3 *) * } */ public static FunctionDescriptor sqlite3_close$descriptor() { return sqlite3_close.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_close(sqlite3 *) * } */ public static MethodHandle sqlite3_close$handle() { return sqlite3_close.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_close(sqlite3 *) * } */ public static MemorySegment sqlite3_close$address() { return sqlite3_close.ADDR; } /** * {@snippet lang=c : * int sqlite3_close(sqlite3 *) * } */ public static int sqlite3_close(MemorySegment x0) { var mh$ = sqlite3_close.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_close", x0); } return (int)mh$.invokeExact(x0); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_exec { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_exec"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_exec(sqlite3 *, const char *sql, int (*callback)(void *, int, char **, char **), void *, char **errmsg) * } */ public static FunctionDescriptor sqlite3_exec$descriptor() { return sqlite3_exec.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_exec(sqlite3 *, const char *sql, int (*callback)(void *, int, char **, char **), void *, char **errmsg) * } */ public static MethodHandle sqlite3_exec$handle() { return sqlite3_exec.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_exec(sqlite3 *, const char *sql, int (*callback)(void *, int, char **, char **), void *, char **errmsg) * } */ public static MemorySegment sqlite3_exec$address() { return sqlite3_exec.ADDR; } /** * {@snippet lang=c : * int sqlite3_exec(sqlite3 *, const char *sql, int (*callback)(void *, int, char **, char **), void *, char **errmsg) * } */ public static int sqlite3_exec(MemorySegment x0, MemorySegment sql, MemorySegment callback, MemorySegment x3, MemorySegment errmsg) { var mh$ = sqlite3_exec.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_exec", x0, sql, callback, x3, errmsg); } return (int)mh$.invokeExact(x0, sql, callback, x3, errmsg); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_last_insert_rowid { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_LONG_LONG, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_last_insert_rowid"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *) * } */ public static FunctionDescriptor sqlite3_last_insert_rowid$descriptor() { return sqlite3_last_insert_rowid.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *) * } */ public static MethodHandle sqlite3_last_insert_rowid$handle() { return sqlite3_last_insert_rowid.HANDLE; } /** * Address for: * {@snippet lang=c : * sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *) * } */ public static MemorySegment sqlite3_last_insert_rowid$address() { return sqlite3_last_insert_rowid.ADDR; } /** * {@snippet lang=c : * sqlite3_int64 sqlite3_last_insert_rowid(sqlite3 *) * } */ public static long sqlite3_last_insert_rowid(MemorySegment x0) { var mh$ = sqlite3_last_insert_rowid.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_last_insert_rowid", x0); } return (long)mh$.invokeExact(x0); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_changes { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_changes"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_changes(sqlite3 *) * } */ public static FunctionDescriptor sqlite3_changes$descriptor() { return sqlite3_changes.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_changes(sqlite3 *) * } */ public static MethodHandle sqlite3_changes$handle() { return sqlite3_changes.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_changes(sqlite3 *) * } */ public static MemorySegment sqlite3_changes$address() { return sqlite3_changes.ADDR; } /** * {@snippet lang=c : * int sqlite3_changes(sqlite3 *) * } */ public static int sqlite3_changes(MemorySegment x0) { var mh$ = sqlite3_changes.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_changes", x0); } return (int)mh$.invokeExact(x0); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_free { public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_free"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * void sqlite3_free(void *) * } */ public static FunctionDescriptor sqlite3_free$descriptor() { return sqlite3_free.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * void sqlite3_free(void *) * } */ public static MethodHandle sqlite3_free$handle() { return sqlite3_free.HANDLE; } /** * Address for: * {@snippet lang=c : * void sqlite3_free(void *) * } */ public static MemorySegment sqlite3_free$address() { return sqlite3_free.ADDR; } /** * {@snippet lang=c : * void sqlite3_free(void *) * } */ public static void sqlite3_free(MemorySegment x0) { var mh$ = sqlite3_free.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_free", x0); } mh$.invokeExact(x0); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_open { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_open"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_open(const char *filename, sqlite3 **ppDb) * } */ public static FunctionDescriptor sqlite3_open$descriptor() { return sqlite3_open.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_open(const char *filename, sqlite3 **ppDb) * } */ public static MethodHandle sqlite3_open$handle() { return sqlite3_open.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_open(const char *filename, sqlite3 **ppDb) * } */ public static MemorySegment sqlite3_open$address() { return sqlite3_open.ADDR; } /** * {@snippet lang=c : * int sqlite3_open(const char *filename, sqlite3 **ppDb) * } */ public static int sqlite3_open(MemorySegment filename, MemorySegment ppDb) { var mh$ = sqlite3_open.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_open", filename, ppDb); } return (int)mh$.invokeExact(filename, ppDb); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_open_v2 { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER, sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_open_v2"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) * } */ public static FunctionDescriptor sqlite3_open_v2$descriptor() { return sqlite3_open_v2.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) * } */ public static MethodHandle sqlite3_open_v2$handle() { return sqlite3_open_v2.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) * } */ public static MemorySegment sqlite3_open_v2$address() { return sqlite3_open_v2.ADDR; } /** * {@snippet lang=c : * int sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) * } */ public static int sqlite3_open_v2(MemorySegment filename, MemorySegment ppDb, int flags, MemorySegment zVfs) { var mh$ = sqlite3_open_v2.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_open_v2", filename, ppDb, flags, zVfs); } return (int)mh$.invokeExact(filename, ppDb, flags, zVfs); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_extended_errcode { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_extended_errcode"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_extended_errcode(sqlite3 *db) * } */ public static FunctionDescriptor sqlite3_extended_errcode$descriptor() { return sqlite3_extended_errcode.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_extended_errcode(sqlite3 *db) * } */ public static MethodHandle sqlite3_extended_errcode$handle() { return sqlite3_extended_errcode.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_extended_errcode(sqlite3 *db) * } */ public static MemorySegment sqlite3_extended_errcode$address() { return sqlite3_extended_errcode.ADDR; } /** * {@snippet lang=c : * int sqlite3_extended_errcode(sqlite3 *db) * } */ public static int sqlite3_extended_errcode(MemorySegment db) { var mh$ = sqlite3_extended_errcode.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_extended_errcode", db); } return (int)mh$.invokeExact(db); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_errmsg { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_POINTER, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_errmsg"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * const char *sqlite3_errmsg(sqlite3 *) * } */ public static FunctionDescriptor sqlite3_errmsg$descriptor() { return sqlite3_errmsg.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * const char *sqlite3_errmsg(sqlite3 *) * } */ public static MethodHandle sqlite3_errmsg$handle() { return sqlite3_errmsg.HANDLE; } /** * Address for: * {@snippet lang=c : * const char *sqlite3_errmsg(sqlite3 *) * } */ public static MemorySegment sqlite3_errmsg$address() { return sqlite3_errmsg.ADDR; } /** * {@snippet lang=c : * const char *sqlite3_errmsg(sqlite3 *) * } */ public static MemorySegment sqlite3_errmsg(MemorySegment x0) { var mh$ = sqlite3_errmsg.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_errmsg", x0); } return (MemorySegment)mh$.invokeExact(x0); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_errstr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_POINTER, sqlite3_h.C_INT ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_errstr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * const char *sqlite3_errstr(int) * } */ public static FunctionDescriptor sqlite3_errstr$descriptor() { return sqlite3_errstr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * const char *sqlite3_errstr(int) * } */ public static MethodHandle sqlite3_errstr$handle() { return sqlite3_errstr.HANDLE; } /** * Address for: * {@snippet lang=c : * const char *sqlite3_errstr(int) * } */ public static MemorySegment sqlite3_errstr$address() { return sqlite3_errstr.ADDR; } /** * {@snippet lang=c : * const char *sqlite3_errstr(int) * } */ public static MemorySegment sqlite3_errstr(int x0) { var mh$ = sqlite3_errstr.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_errstr", x0); } return (MemorySegment)mh$.invokeExact(x0); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_prepare_v2 { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER, sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_prepare_v2"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_prepare_v2(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt **ppStmt, const char **pzTail) * } */ public static FunctionDescriptor sqlite3_prepare_v2$descriptor() { return sqlite3_prepare_v2.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_prepare_v2(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt **ppStmt, const char **pzTail) * } */ public static MethodHandle sqlite3_prepare_v2$handle() { return sqlite3_prepare_v2.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_prepare_v2(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt **ppStmt, const char **pzTail) * } */ public static MemorySegment sqlite3_prepare_v2$address() { return sqlite3_prepare_v2.ADDR; } /** * {@snippet lang=c : * int sqlite3_prepare_v2(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt **ppStmt, const char **pzTail) * } */ public static int sqlite3_prepare_v2(MemorySegment db, MemorySegment zSql, int nByte, MemorySegment ppStmt, MemorySegment pzTail) { var mh$ = sqlite3_prepare_v2.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_prepare_v2", db, zSql, nByte, ppStmt, pzTail); } return (int)mh$.invokeExact(db, zSql, nByte, ppStmt, pzTail); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_bind_int { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_INT, sqlite3_h.C_INT ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_bind_int"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_bind_int(sqlite3_stmt *, int, int) * } */ public static FunctionDescriptor sqlite3_bind_int$descriptor() { return sqlite3_bind_int.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_bind_int(sqlite3_stmt *, int, int) * } */ public static MethodHandle sqlite3_bind_int$handle() { return sqlite3_bind_int.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_bind_int(sqlite3_stmt *, int, int) * } */ public static MemorySegment sqlite3_bind_int$address() { return sqlite3_bind_int.ADDR; } /** * {@snippet lang=c : * int sqlite3_bind_int(sqlite3_stmt *, int, int) * } */ public static int sqlite3_bind_int(MemorySegment x0, int x1, int x2) { var mh$ = sqlite3_bind_int.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_bind_int", x0, x1, x2); } return (int)mh$.invokeExact(x0, x1, x2); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_bind_text { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_bind_text"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_bind_text(sqlite3_stmt *, int, const char *, int, void (*)(void *)) * } */ public static FunctionDescriptor sqlite3_bind_text$descriptor() { return sqlite3_bind_text.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_bind_text(sqlite3_stmt *, int, const char *, int, void (*)(void *)) * } */ public static MethodHandle sqlite3_bind_text$handle() { return sqlite3_bind_text.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_bind_text(sqlite3_stmt *, int, const char *, int, void (*)(void *)) * } */ public static MemorySegment sqlite3_bind_text$address() { return sqlite3_bind_text.ADDR; } /** * {@snippet lang=c : * int sqlite3_bind_text(sqlite3_stmt *, int, const char *, int, void (*)(void *)) * } */ public static int sqlite3_bind_text(MemorySegment x0, int x1, MemorySegment x2, int x3, MemorySegment x4) { var mh$ = sqlite3_bind_text.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_bind_text", x0, x1, x2, x3, x4); } return (int)mh$.invokeExact(x0, x1, x2, x3, x4); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_column_count { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_column_count"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_column_count(sqlite3_stmt *pStmt) * } */ public static FunctionDescriptor sqlite3_column_count$descriptor() { return sqlite3_column_count.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_column_count(sqlite3_stmt *pStmt) * } */ public static MethodHandle sqlite3_column_count$handle() { return sqlite3_column_count.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_column_count(sqlite3_stmt *pStmt) * } */ public static MemorySegment sqlite3_column_count$address() { return sqlite3_column_count.ADDR; } /** * {@snippet lang=c : * int sqlite3_column_count(sqlite3_stmt *pStmt) * } */ public static int sqlite3_column_count(MemorySegment pStmt) { var mh$ = sqlite3_column_count.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_column_count", pStmt); } return (int)mh$.invokeExact(pStmt); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_column_name { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_POINTER, sqlite3_h.C_POINTER, sqlite3_h.C_INT ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_column_name"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * const char *sqlite3_column_name(sqlite3_stmt *, int N) * } */ public static FunctionDescriptor sqlite3_column_name$descriptor() { return sqlite3_column_name.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * const char *sqlite3_column_name(sqlite3_stmt *, int N) * } */ public static MethodHandle sqlite3_column_name$handle() { return sqlite3_column_name.HANDLE; } /** * Address for: * {@snippet lang=c : * const char *sqlite3_column_name(sqlite3_stmt *, int N) * } */ public static MemorySegment sqlite3_column_name$address() { return sqlite3_column_name.ADDR; } /** * {@snippet lang=c : * const char *sqlite3_column_name(sqlite3_stmt *, int N) * } */ public static MemorySegment sqlite3_column_name(MemorySegment x0, int N) { var mh$ = sqlite3_column_name.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_column_name", x0, N); } return (MemorySegment)mh$.invokeExact(x0, N); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_step { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_step"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_step(sqlite3_stmt *) * } */ public static FunctionDescriptor sqlite3_step$descriptor() { return sqlite3_step.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_step(sqlite3_stmt *) * } */ public static MethodHandle sqlite3_step$handle() { return sqlite3_step.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_step(sqlite3_stmt *) * } */ public static MemorySegment sqlite3_step$address() { return sqlite3_step.ADDR; } /** * {@snippet lang=c : * int sqlite3_step(sqlite3_stmt *) * } */ public static int sqlite3_step(MemorySegment x0) { var mh$ = sqlite3_step.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_step", x0); } return (int)mh$.invokeExact(x0); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_column_int { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_INT ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_column_int"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_column_int(sqlite3_stmt *, int iCol) * } */ public static FunctionDescriptor sqlite3_column_int$descriptor() { return sqlite3_column_int.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_column_int(sqlite3_stmt *, int iCol) * } */ public static MethodHandle sqlite3_column_int$handle() { return sqlite3_column_int.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_column_int(sqlite3_stmt *, int iCol) * } */ public static MemorySegment sqlite3_column_int$address() { return sqlite3_column_int.ADDR; } /** * {@snippet lang=c : * int sqlite3_column_int(sqlite3_stmt *, int iCol) * } */ public static int sqlite3_column_int(MemorySegment x0, int iCol) { var mh$ = sqlite3_column_int.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_column_int", x0, iCol); } return (int)mh$.invokeExact(x0, iCol); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_column_text { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_POINTER, sqlite3_h.C_POINTER, sqlite3_h.C_INT ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_column_text"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * const unsigned char *sqlite3_column_text(sqlite3_stmt *, int iCol) * } */ public static FunctionDescriptor sqlite3_column_text$descriptor() { return sqlite3_column_text.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * const unsigned char *sqlite3_column_text(sqlite3_stmt *, int iCol) * } */ public static MethodHandle sqlite3_column_text$handle() { return sqlite3_column_text.HANDLE; } /** * Address for: * {@snippet lang=c : * const unsigned char *sqlite3_column_text(sqlite3_stmt *, int iCol) * } */ public static MemorySegment sqlite3_column_text$address() { return sqlite3_column_text.ADDR; } /** * {@snippet lang=c : * const unsigned char *sqlite3_column_text(sqlite3_stmt *, int iCol) * } */ public static MemorySegment sqlite3_column_text(MemorySegment x0, int iCol) { var mh$ = sqlite3_column_text.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_column_text", x0, iCol); } return (MemorySegment)mh$.invokeExact(x0, iCol); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_column_type { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_INT ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_column_type"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_column_type(sqlite3_stmt *, int iCol) * } */ public static FunctionDescriptor sqlite3_column_type$descriptor() { return sqlite3_column_type.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_column_type(sqlite3_stmt *, int iCol) * } */ public static MethodHandle sqlite3_column_type$handle() { return sqlite3_column_type.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_column_type(sqlite3_stmt *, int iCol) * } */ public static MemorySegment sqlite3_column_type$address() { return sqlite3_column_type.ADDR; } /** * {@snippet lang=c : * int sqlite3_column_type(sqlite3_stmt *, int iCol) * } */ public static int sqlite3_column_type(MemorySegment x0, int iCol) { var mh$ = sqlite3_column_type.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_column_type", x0, iCol); } return (int)mh$.invokeExact(x0, iCol); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_finalize { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_finalize"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_finalize(sqlite3_stmt *pStmt) * } */ public static FunctionDescriptor sqlite3_finalize$descriptor() { return sqlite3_finalize.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_finalize(sqlite3_stmt *pStmt) * } */ public static MethodHandle sqlite3_finalize$handle() { return sqlite3_finalize.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_finalize(sqlite3_stmt *pStmt) * } */ public static MemorySegment sqlite3_finalize$address() { return sqlite3_finalize.ADDR; } /** * {@snippet lang=c : * int sqlite3_finalize(sqlite3_stmt *pStmt) * } */ public static int sqlite3_finalize(MemorySegment pStmt) { var mh$ = sqlite3_finalize.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_finalize", pStmt); } return (int)mh$.invokeExact(pStmt); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_reset { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_reset"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_reset(sqlite3_stmt *pStmt) * } */ public static FunctionDescriptor sqlite3_reset$descriptor() { return sqlite3_reset.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_reset(sqlite3_stmt *pStmt) * } */ public static MethodHandle sqlite3_reset$handle() { return sqlite3_reset.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_reset(sqlite3_stmt *pStmt) * } */ public static MemorySegment sqlite3_reset$address() { return sqlite3_reset.ADDR; } /** * {@snippet lang=c : * int sqlite3_reset(sqlite3_stmt *pStmt) * } */ public static int sqlite3_reset(MemorySegment pStmt) { var mh$ = sqlite3_reset.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_reset", pStmt); } return (int)mh$.invokeExact(pStmt); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static class sqlite3_strlike { public static final FunctionDescriptor DESC = FunctionDescriptor.of( sqlite3_h.C_INT, sqlite3_h.C_POINTER, sqlite3_h.C_POINTER, sqlite3_h.C_INT ); public static final MemorySegment ADDR = SYMBOL_LOOKUP.findOrThrow("sqlite3_strlike"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } /** * Function descriptor for: * {@snippet lang=c : * int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc) * } */ public static FunctionDescriptor sqlite3_strlike$descriptor() { return sqlite3_strlike.DESC; } /** * Downcall method handle for: * {@snippet lang=c : * int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc) * } */ public static MethodHandle sqlite3_strlike$handle() { return sqlite3_strlike.HANDLE; } /** * Address for: * {@snippet lang=c : * int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc) * } */ public static MemorySegment sqlite3_strlike$address() { return sqlite3_strlike.ADDR; } /** * {@snippet lang=c : * int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc) * } */ public static int sqlite3_strlike(MemorySegment zGlob, MemorySegment zStr, int cEsc) { var mh$ = sqlite3_strlike.HANDLE; try { if (TRACE_DOWNCALLS) { traceDowncall("sqlite3_strlike", zGlob, zStr, cEsc); } return (int)mh$.invokeExact(zGlob, zStr, cEsc); } catch (Error | RuntimeException ex) { throw ex; } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } private static final MemorySegment SQLITE_STATIC = MemorySegment.ofAddress(0L); /** * {@snippet lang=c : * #define SQLITE_STATIC (void*) 0 * } */ public static MemorySegment SQLITE_STATIC() { return SQLITE_STATIC; } private static final MemorySegment SQLITE_TRANSIENT = MemorySegment.ofAddress(-1L); /** * {@snippet lang=c : * #define SQLITE_TRANSIENT (void*) -1 * } */ public static MemorySegment SQLITE_TRANSIENT() { return SQLITE_TRANSIENT; } }