File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -393,6 +393,17 @@ const moduleObserver = Process.attachModuleObserver({
393393} ) ;
394394moduleObserver . detach ( ) ;
395395
396+ const db = SqliteDatabase . openInline ( "AAAA" ) ;
397+ const stmt = db . prepare ( "SELECT * from tab;" ) ;
398+ // $ExpectType string[]
399+ stmt . columnNames ;
400+ // $ExpectType SqliteColumnType[]
401+ stmt . columnTypes ;
402+ // $ExpectType (string | null)[]
403+ stmt . declaredTypes ;
404+ // $ExpectType number
405+ stmt . paramsCount ;
406+
396407// $ExpectType Profiler
397408const profiler = new Profiler ( ) ;
398409const sampler = new BusyCycleSampler ( ) ;
Original file line number Diff line number Diff line change @@ -3118,6 +3118,28 @@ type SqliteOpenFlag =
31183118 * Pre-compiled SQL statement.
31193119 */
31203120declare class SqliteStatement {
3121+ /**
3122+ * Names of the columns in the prepared statement.
3123+ */
3124+ readonly columnNames : string [ ] ;
3125+
3126+ /**
3127+ * Types of the columns in the prepared statement.
3128+ */
3129+ readonly columnTypes : SqliteColumnType [ ] ;
3130+
3131+ /**
3132+ * Declared types of the columns as specified in the table schema. Each
3133+ * element is the type string (e.g. `"TEXT"`, `"INTEGER"`) or `null` if
3134+ * the column has no declared type (e.g. expression columns).
3135+ */
3136+ readonly declaredTypes : Array < string | null > ;
3137+
3138+ /**
3139+ * Number of SQL parameters in the prepared statement.
3140+ */
3141+ readonly paramsCount : number ;
3142+
31213143 /**
31223144 * Binds the integer `value` to `index`.
31233145 *
@@ -3172,6 +3194,8 @@ declare class SqliteStatement {
31723194 reset ( ) : void ;
31733195}
31743196
3197+ type SqliteColumnType = "integer" | "float" | "text" | "blob" | "null" ;
3198+
31753199/**
31763200 * Intercepts execution through inline hooking.
31773201 */
You can’t perform that action at this time.
0 commit comments