sqlload 0.50.0

SQL data loading tooling.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Columns of one table in the current database (MotherDuck attaches the account's other databases too), in table order.
pub const DESCRIBE_TABLE_SQL: &str = "SELECT column_name, data_type, numeric_precision, numeric_scale, character_maximum_length FROM information_schema.columns WHERE table_catalog = current_database() AND table_schema = ? AND table_name = ? ORDER BY ordinal_position";
/// A table's `CREATE TABLE` statement, by schema and name.
pub const DEFINITION_QUERY: &str = "SELECT sql FROM duckdb_tables() WHERE database_name = current_database() AND lower(schema_name) = lower(?) AND lower(table_name) = lower(?)";
/// The `CREATE INDEX` statements of a table's indexes, by schema and name.
pub const INDEXES_QUERY: &str = "SELECT sql FROM duckdb_indexes() WHERE database_name = current_database() AND lower(schema_name) = lower(?) AND lower(table_name) = lower(?) AND sql IS NOT NULL ORDER BY index_name";
/// The UTC offset an unloaded timestamp with time zone's text is read with.
pub const UTC_OFFSET: &str = "+00";
/// The environment variables a MotherDuck token is taken from when the connection sets none, in order.
pub const MOTHERDUCK_TOKEN_VARIABLES: &[&str] = &["motherduck_token", "MOTHERDUCK_TOKEN"];
/// Part of the message MotherDuck's extension refuses to load with on a DuckDB version it does not support.
pub const MOTHERDUCK_UNSUPPORTED_DUCKDB: &str = "is not yet supported by MotherDuck";
/// What precedes the extension's own message in DuckDB's error.
pub const EXTENSION_EXCEPTION: &str = "threw an exception: ";
/// The `_sqlload_row` span of one unloaded batch (2^48): its files' rows number from the batch times this.
pub const UNLOADED_BATCH_ROWS: i64 = 1 << 48;
/// The `_sqlload_row` span of one unloaded file in a batch (2^32).
pub const UNLOADED_FILE_ROWS: i64 = 1 << 32;