Skip to main content

TableFunction

Enum TableFunction 

Source
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

Source

pub const fn name(self) -> &'static str

The name the plan records and an error message says.

Source

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.

Source

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.

Source

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.

Source

pub fn lookup(name: &str) -> Option<Self>

The function of that name, if there is one.

Trait Implementations§

Source§

impl Clone for TableFunction

Source§

fn clone(&self) -> TableFunction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TableFunction

Source§

impl Debug for TableFunction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TableFunction

Source§

impl PartialEq for TableFunction

Source§

fn eq(&self, other: &TableFunction) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TableFunction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.