Sql

data class Sql(val transactions: List<List<String>>)

Represents a list of SQL transactions, where each transaction consists of one or more SQL statements. Each transaction MUST NOT contain the BEGIN/COMMIT statements. Each inner list is a single transaction, and each String is a single statement within that transaction.

Most callers likely only need a single transaction, but e.g. BigQuery disallows running DDL inside transactions, and so needs to run sequential "CREATE SCHEMA", "CREATE TABLE" as separate transactions.

Callers are encouraged to use the static factory methods instead of the public constructor.

Constructors

Link copied to clipboard
constructor(transactions: List<List<String>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun asSqlStrings(begin: String, commit: String): List<String>