pub struct RemoteTableRef {
pub table_ref: TableReference,
pub args: Option<Arc<[FunctionArg]>>,
}
Expand description
A multipart identifier to a remote table, view or parameterized view.
RemoteTableRef can be created by parsing from a string representing a table object with optional
use datafusion_federation::sql::RemoteTableRef;
use datafusion::sql::sqlparser::dialect::PostgreSqlDialect;
RemoteTableRef::try_from("myschema.table");
RemoteTableRef::try_from(r#"myschema."Table""#);
RemoteTableRef::try_from("myschema.view('obj')");
RemoteTableRef::parse_with_dialect("myschema.view(name = 'obj')", &PostgreSqlDialect {});
Fields§
§table_ref: TableReference
§args: Option<Arc<[FunctionArg]>>
Implementations§
Source§impl RemoteTableRef
impl RemoteTableRef
Sourcepub fn to_quoted_string(&self) -> String
pub fn to_quoted_string(&self) -> String
Get quoted_string representation for the table it is referencing, this is same as calling to_quoted_string on the inner table reference.
Sourcepub fn parse_with_default_dialect(s: &str) -> Result<Self, DataFusionError>
pub fn parse_with_default_dialect(s: &str) -> Result<Self, DataFusionError>
Create new using general purpose dialect. Prefer Self::parse_with_dialect
if the dialect is known beforehand
Sourcepub fn parse_with_dialect(
s: &str,
dialect: &dyn Dialect,
) -> Result<Self, DataFusionError>
pub fn parse_with_dialect( s: &str, dialect: &dyn Dialect, ) -> Result<Self, DataFusionError>
Create new using a specific instance of dialect.
pub fn table_ref(&self) -> &TableReference
pub fn args(&self) -> Option<&[FunctionArg]>
Trait Implementations§
Source§impl Clone for RemoteTableRef
impl Clone for RemoteTableRef
Source§fn clone(&self) -> RemoteTableRef
fn clone(&self) -> RemoteTableRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RemoteTableRef
impl Debug for RemoteTableRef
Source§impl From<&RemoteTableRef> for TableReference
impl From<&RemoteTableRef> for TableReference
Source§fn from(remote_table_ref: &RemoteTableRef) -> Self
fn from(remote_table_ref: &RemoteTableRef) -> Self
Converts to this type from the input type.
Source§impl From<(TableReference, Vec<FunctionArg>)> for RemoteTableRef
impl From<(TableReference, Vec<FunctionArg>)> for RemoteTableRef
Source§fn from((table_ref, args): (TableReference, Vec<FunctionArg>)) -> Self
fn from((table_ref, args): (TableReference, Vec<FunctionArg>)) -> Self
Converts to this type from the input type.
Source§impl From<RemoteTableRef> for TableReference
impl From<RemoteTableRef> for TableReference
Source§fn from(remote_table_ref: RemoteTableRef) -> Self
fn from(remote_table_ref: RemoteTableRef) -> Self
Converts to this type from the input type.
Source§impl From<TableReference> for RemoteTableRef
impl From<TableReference> for RemoteTableRef
Source§fn from(table_ref: TableReference) -> Self
fn from(table_ref: TableReference) -> Self
Converts to this type from the input type.
Source§impl Hash for RemoteTableRef
impl Hash for RemoteTableRef
Source§impl PartialEq for RemoteTableRef
impl PartialEq for RemoteTableRef
Source§impl TryFrom<&String> for RemoteTableRef
impl TryFrom<&String> for RemoteTableRef
Source§impl TryFrom<&str> for RemoteTableRef
impl TryFrom<&str> for RemoteTableRef
Source§impl TryFrom<String> for RemoteTableRef
impl TryFrom<String> for RemoteTableRef
impl Eq for RemoteTableRef
impl StructuralPartialEq for RemoteTableRef
Auto Trait Implementations§
impl Freeze for RemoteTableRef
impl RefUnwindSafe for RemoteTableRef
impl Send for RemoteTableRef
impl Sync for RemoteTableRef
impl Unpin for RemoteTableRef
impl UnwindSafe for RemoteTableRef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more