Here's a further example in action to help demonstrate as well: ``` public executeTransaction(

Here's a further example in action to help demonstrate as well:

public executeTransaction(
    queries: { sql: string; params?: unknown[] }[]
): unknown[] {
    return this.storage.transactionSync(() => {
        const results = []

        try {
            for (const queryObj of queries) {
                const { sql, params } = queryObj
                const result = this.executeQuery({ sql, params })
                results.push(result)
            }

            return results
        } catch (error) {
            console.error('Transaction Execution Error:', error)
            throw error
        }
    })
}
Was this page helpful?