(
schemaName: string,
name: string
)
| 207 | } |
| 208 | |
| 209 | async trigger( |
| 210 | schemaName: string, |
| 211 | name: string |
| 212 | ): Promise<DatabaseTriggerSchema> { |
| 213 | const result = await this.query( |
| 214 | `SELECT * FROM ${this.escapeId(schemaName)}.sqlite_schema WHERE "type"='trigger' AND name=${escapeSqlValue( |
| 215 | name |
| 216 | )};` |
| 217 | ); |
| 218 | |
| 219 | const triggerRow = result.rows[0] as { sql: string } | undefined; |
| 220 | if (!triggerRow) throw new Error("Trigger does not exist"); |
| 221 | |
| 222 | return parseCreateTriggerScript(schemaName, triggerRow.sql); |
| 223 | } |
| 224 | |
| 225 | close(): void { |
| 226 | // do nothing |
nothing calls this directly
no test coverage detected