From 68c62005728a9e22e341ee6140ef2e338ba8d10e Mon Sep 17 00:00:00 2001 From: codecolorist Date: Sat, 21 Feb 2026 22:50:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74539=20Sync=20fri?= =?UTF-8?q?da-gum=20typings=20with=20Frida=2017.8.0=20by=20@ChiChou?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/frida-gum/frida-gum-tests.ts | 11 +++++++++++ types/frida-gum/index.d.ts | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/types/frida-gum/frida-gum-tests.ts b/types/frida-gum/frida-gum-tests.ts index fda416b0500e45..84b058a7c3bb0f 100644 --- a/types/frida-gum/frida-gum-tests.ts +++ b/types/frida-gum/frida-gum-tests.ts @@ -393,6 +393,17 @@ const moduleObserver = Process.attachModuleObserver({ }); moduleObserver.detach(); +const db = SqliteDatabase.openInline("AAAA"); +const stmt = db.prepare("SELECT * from tab;"); +// $ExpectType string[] +stmt.columnNames; +// $ExpectType SqliteColumnType[] +stmt.columnTypes; +// $ExpectType (string | null)[] +stmt.declaredTypes; +// $ExpectType number +stmt.paramsCount; + // $ExpectType Profiler const profiler = new Profiler(); const sampler = new BusyCycleSampler(); diff --git a/types/frida-gum/index.d.ts b/types/frida-gum/index.d.ts index 3d036f8b2c7b73..fc989bf079b842 100644 --- a/types/frida-gum/index.d.ts +++ b/types/frida-gum/index.d.ts @@ -3118,6 +3118,28 @@ type SqliteOpenFlag = * Pre-compiled SQL statement. */ declare class SqliteStatement { + /** + * Names of the columns in the prepared statement. + */ + readonly columnNames: string[]; + + /** + * Types of the columns in the prepared statement. + */ + readonly columnTypes: SqliteColumnType[]; + + /** + * Declared types of the columns as specified in the table schema. Each + * element is the type string (e.g. `"TEXT"`, `"INTEGER"`) or `null` if + * the column has no declared type (e.g. expression columns). + */ + readonly declaredTypes: Array; + + /** + * Number of SQL parameters in the prepared statement. + */ + readonly paramsCount: number; + /** * Binds the integer `value` to `index`. * @@ -3172,6 +3194,8 @@ declare class SqliteStatement { reset(): void; } +type SqliteColumnType = "integer" | "float" | "text" | "blob" | "null"; + /** * Intercepts execution through inline hooking. */