queries_for_sqlx::create_table_st

Struct CreateTableSt

source
pub struct CreateTableSt<'q, S, Q: Query<S>> { /* private fields */ }

Implementations§

source§

impl<'q, S, Q> CreateTableSt<'q, S, Q>
where S: 'static + Database, Q: Query<S>,

source

pub fn verbatim(&mut self, verbatim: &str) -> &mut Self

source

pub fn column<Ty>( &mut self, column: &'static str, con: impl Constraints<S, Q, Ty> + 'static + Send + Sync, ) -> &mut Self
where S: Sync, Ty: Type<S> + 'static + Send + Sync + 'q, Q::Context1: 'q, Q: 'q,

source

pub fn foreign_key(&mut self, fk: Fk) -> &mut Self
where S: SqlxQuery + Sync, Q: 'q, <S as SqlxQuery>::KeyType: Send,

👎Deprecated: use constraint in create_table_st2

Trait Implementations§

source§

impl<'q, S, Q> NoCache<'q, S> for CreateTableSt<'q, S, Q>
where S: Database + SupportNamedBind, Q: Query<S, Output = <S as HasArguments<'q>>::Arguments>,

source§

fn build(self) -> (String, <S as HasArguments<'q>>::Arguments)

source§

impl<'q, S, Q> Statement<S, Q> for CreateTableSt<'q, S, Q>
where S: 'static + Database, Q: Query<S>,

source§

type Init = ()

source§

fn init(_: Self::Init) -> Self

source§

fn _build(self) -> (String, Q::Output)

Auto Trait Implementations§

§

impl<'q, S, Q> Freeze for CreateTableSt<'q, S, Q>
where <Q as Query<S>>::Context1: Freeze,

§

impl<'q, S, Q> !RefUnwindSafe for CreateTableSt<'q, S, Q>

§

impl<'q, S, Q> Send for CreateTableSt<'q, S, Q>
where <Q as Query<S>>::Context1: Send, S: Send,

§

impl<'q, S, Q> !Sync for CreateTableSt<'q, S, Q>

§

impl<'q, S, Q> Unpin for CreateTableSt<'q, S, Q>
where <Q as Query<S>>::Context1: Unpin, S: Unpin,

§

impl<'q, S, Q> !UnwindSafe for CreateTableSt<'q, S, Q>

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<'q, S, T> ExecuteNoCache<'q, S> for T
where S: Database, T: NoCache<'q, S>,

source§

fn execute<E>( self, executor: E, ) -> impl Future<Output = Result<S::QueryResult, Error>> + Send
where E: for<'e> Executor<'e, Database = S>,

source§

fn fetch_one<E, O, F>( self, executor: E, with: F, ) -> impl Future<Output = Result<O, Error>> + Send
where E: for<'e> Executor<'e, Database = S>, F: FnOnce(S::Row) -> Result<O, Error> + Send,

source§

fn fetch_optional<E, O, F>( self, executor: E, with: F, ) -> impl Future<Output = Result<Option<O>, Error>> + Send
where E: for<'e> Executor<'e, Database = S>, F: FnOnce(S::Row) -> Result<O, Error> + Send,

source§

fn fetch_all<E, O, F>( self, executor: E, with: F, ) -> impl Future<Output = Result<Vec<O>, Error>> + Send
where E: for<'e> Executor<'e, Database = S>, F: FnMut(S::Row) -> Result<O, Error> + Send,

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

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

source§

type Error = Infallible

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

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

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more