pub enum TableFunction {
Show 24 variants
Range,
GenerateSeries,
ReadParquet,
ReadCsv,
RudbStrategies,
DuckdbKeywords,
DuckdbTypes,
DuckdbFunctions,
DuckdbSettings,
DuckdbDatabases,
DuckdbSchemas,
DuckdbTables,
DuckdbViews,
DuckdbColumns,
DuckdbExtensions,
DuckdbOptimizers,
DuckdbDialects,
DuckdbGrammarExtensions,
PragmaTableInfo,
PragmaShow,
PragmaVersion,
PragmaPlatform,
PragmaUserAgent,
PragmaDatabaseSize,
}Expand description
Which table function a call resolved to.
An enum rather than a name, because the executor dispatches on this and a string comparison per operator build is a string comparison that can be spelled wrong.
Variants§
Range
range(stop), range(start, stop), range(start, stop, step), stopping before the end.
GenerateSeries
The same three, stopping on the end.
ReadParquet
read_parquet(path), the rows of a Parquet file.
ReadCsv
read_csv(path), the rows of a CSV file, with everything about how it is written sniffed.
RudbStrategies
rudb_strategies(), every seam and every implementation registered against it.
DuckdbKeywords
duckdb_keywords(), every word the grammar knows and which class each one is in.
DuckdbTypes
duckdb_types(), every type name the engine knows and what each one stands for.
DuckdbFunctions
duckdb_functions(), every function the engine knows and what each one takes.
DuckdbSettings
duckdb_settings(), every setting SET will take and what each one is now.
DuckdbDatabases
duckdb_databases(), every database attached to this session.
DuckdbSchemas
duckdb_schemas(), every schema in every one of them.
DuckdbTables
duckdb_tables(), every base table somebody created.
DuckdbViews
duckdb_views(), every view somebody created.
DuckdbColumns
duckdb_columns(), every column of every one of those.
DuckdbExtensions
duckdb_extensions(), every extension DuckDB names and whether this engine has it.
DuckdbOptimizers
duckdb_optimizers(), every name SET disabled_optimizers takes.
DuckdbDialects
duckdb_dialects(), every installed SQL parser dialect.
DuckdbGrammarExtensions
duckdb_grammar_extensions(), every installed grammar extension.
PragmaTableInfo
pragma_table_info(name), the columns of one table or view, in SQLite’s six columns.
PragmaShow
pragma_show(name), the same columns again in the six DESCRIBE answers with.
PragmaVersion
pragma_version(), the version of the engine answering, in three columns.
PragmaPlatform
pragma_platform(), the operating system and processor this build was made for.
PragmaUserAgent
pragma_user_agent(), the one line a client sends when it says who it is.
PragmaDatabaseSize
pragma_database_size(), what each attached database costs on disk and in memory.
Implementations§
Source§impl TableFunction
impl TableFunction
Sourcepub const fn takes_a_name(self) -> bool
pub const fn takes_a_name(self) -> bool
Whether the call takes one table name and answers about whatever that names.
The two pragmas are the only ones, and they are a family rather than a pair because the rest
of the pragma_* functions that take a name are the storage ones, which land here the day
rudb has storage to describe.
Sourcepub const fn inclusive(self) -> bool
pub const fn inclusive(self) -> bool
Whether the last value is produced.
Only the two series functions differ here. The file readers answer false and nothing asks them.
Sourcepub fn parameters(self) -> &'static [(&'static str, LogicalType)]
pub fn parameters(self) -> &'static [(&'static str, LogicalType)]
The named parameters the call takes, and the type each one wants.
This is the list rudb acts on and not the list DuckDB prints, and the difference is worth
being plain about. read_parquet there takes seventeen named parameters and read_csv
takes around thirty. One of the Parquet ones is on the critical path, since the ClickBench
entry reads its file with binary_as_string=True and without it every string column in
hits.parquet comes back as BLOB, and the other sixteen have no caller here yet. A
parameter that is listed is one that does something, so this list grows as they land rather
than accepting names and ignoring them, which is the failure mode that makes an option look
supported when it is not.
The CSV ones here are the ones that say how the file is written, which are the ones where
guessing wrong changes the answer rather than the speed. sep is DuckDB’s other name for
delim and is a separate row rather than an alias, because the list is also what the
candidates on a misspelling are read out of and the binary prints both of them.
Trait Implementations§
Source§impl Clone for TableFunction
impl Clone for TableFunction
Source§fn clone(&self) -> TableFunction
fn clone(&self) -> TableFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more