pub struct CreateForeignTable {
pub name: ObjectName,
pub if_not_exists: bool,
pub columns: Vec<ColumnDef>,
pub constraints: Vec<TableConstraint>,
pub inherits: Option<Vec<ObjectName>>,
pub partition_of: Option<ObjectName>,
pub for_values: Option<ForValues>,
pub server_name: Ident,
pub options: Option<Vec<CreateServerOption>>,
}Expand description
A CREATE FOREIGN TABLE statement.
See PostgreSQL
Fields§
§name: ObjectNameThe foreign table name.
if_not_exists: boolWhether IF NOT EXISTS was specified.
columns: Vec<ColumnDef>Column definitions.
constraints: Vec<TableConstraint>Table-level constraints (e.g. CHECK (...), composite FOREIGN KEY).
PostgreSQL’s grammar accepts these here, but rejects primary key, unique,
foreign key and exclusion constraints on a foreign table at execution.
inherits: Option<Vec<ObjectName>>INHERITS ( parent_table [, ...] )
partition_of: Option<ObjectName>The parent table of PARTITION OF parent_table.
for_values: Option<ForValues>The partition bound following PARTITION OF.
server_name: IdentThe SERVER server_name clause.
options: Option<Vec<CreateServerOption>>Optional OPTIONS (key 'value', ...) clause at the table level.
Trait Implementations§
Source§impl Clone for CreateForeignTable
impl Clone for CreateForeignTable
Source§fn clone(&self) -> CreateForeignTable
fn clone(&self) -> CreateForeignTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateForeignTable
impl Debug for CreateForeignTable
Source§impl Display for CreateForeignTable
impl Display for CreateForeignTable
impl Eq for CreateForeignTable
Source§impl From<CreateForeignTable> for Statement
impl From<CreateForeignTable> for Statement
Source§fn from(v: CreateForeignTable) -> Self
fn from(v: CreateForeignTable) -> Self
Converts to this type from the input type.
Source§impl Hash for CreateForeignTable
impl Hash for CreateForeignTable
Source§impl Ord for CreateForeignTable
impl Ord for CreateForeignTable
Source§fn cmp(&self, other: &CreateForeignTable) -> Ordering
fn cmp(&self, other: &CreateForeignTable) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CreateForeignTable
impl PartialEq for CreateForeignTable
Source§impl PartialOrd for CreateForeignTable
impl PartialOrd for CreateForeignTable
Source§impl Spanned for CreateForeignTable
impl Spanned for CreateForeignTable
impl StructuralPartialEq for CreateForeignTable
Auto Trait Implementations§
impl Freeze for CreateForeignTable
impl RefUnwindSafe for CreateForeignTable
impl Send for CreateForeignTable
impl Sync for CreateForeignTable
impl Unpin for CreateForeignTable
impl UnsafeUnpin for CreateForeignTable
impl UnwindSafe for CreateForeignTable
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