Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
TableReference in datafusion_common - Rust
[go: Go Back, main page]

pub enum TableReference<'a> {
    Bare {
        table: &'a str,
    },
    Partial {
        schema: &'a str,
        table: &'a str,
    },
    Full {
        catalog: &'a str,
        schema: &'a str,
        table: &'a str,
    },
}
Expand description

Represents a path to a table that may require further resolution

Variants§

§

Bare

Fields

§table: &'a str

The table name

An unqualified table reference, e.g. “table”

§

Partial

Fields

§schema: &'a str

The schema containing the table

§table: &'a str

The table name

A partially resolved table reference, e.g. “schema.table”

§

Full

Fields

§catalog: &'a str

The catalog (aka database) containing the table

§schema: &'a str

The schema containing the table

§table: &'a str

The table name

A fully resolved table reference, e.g. “catalog.schema.table”

Implementations§

source§

impl<'a> TableReference<'a>

source

pub fn table(&self) -> &str

Retrieve the actual table name, regardless of qualification

source

pub fn resolve(
    self,
    default_catalog: &'a str,
    default_schema: &'a str
) -> ResolvedTableReference<'a>

Given a default catalog and schema, ensure this table reference is fully resolved

source

pub fn parse_str(s: &'a str) -> Self

Forms a TableReference by splitting s on periods ..

Note that this function does NOT handle periods or name normalization correctly (e.g. "foo.bar" will be parsed as "foo.bar". and Foo will be parsed as Foo (not foo).

If you need to handle such identifiers correctly, you should use a SQL parser or form the OwnedTableReference directly.

See more detail in https://github.com/apache/arrow-datafusion/issues/4532

Trait Implementations§

source§

impl<'a> Clone for TableReference<'a>

source§

fn clone(&self) -> TableReference<'a>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for TableReference<'a>

source§

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

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

impl<'a> From<&'a OwnedTableReference> for TableReference<'a>

Convert OwnedTableReference into a TableReference. Somewhat akward to use but ‘idiomatic’: (&table_ref).into()

source§

fn from(r: &'a OwnedTableReference) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for TableReference<'a>

Parse a string into a TableReference, by splittig on .

See caveats on TableReference::parse_str

source§

fn from(s: &'a str) -> Self

Converts to this type from the input type.
source§

impl<'a> From<ResolvedTableReference<'a>> for TableReference<'a>

source§

fn from(resolved: ResolvedTableReference<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> Copy for TableReference<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for TableReference<'a>

§

impl<'a> Send for TableReference<'a>

§

impl<'a> Sync for TableReference<'a>

§

impl<'a> Unpin for TableReference<'a>

§

impl<'a> UnwindSafe for TableReference<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere
    T: Clone,

§

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 Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

impl<T> Allocation for Twhere
    T: RefUnwindSafe + Send + Sync,