Skip to main content

BoundTypes

Struct BoundTypes 

Source
pub struct BoundTypes {
Show 16 fields pub id: u8, pub boolean: bool, pub int8: i8, pub uint8: u8, pub int16: i16, pub uint16: u16, pub int32: i32, pub uint32: u32, pub int64: i64, pub float32: f32, pub float64: f64, pub text: String, pub uuid: Uuid, pub date: Date, pub time: Time, pub decimal: FixedDecimal<20, 4>,
}

Fields§

§id: u8§boolean: bool§int8: i8§uint8: u8§int16: i16§uint16: u16§int32: i32§uint32: u32§int64: i64§float32: f32§float64: f64§text: String§uuid: Uuid§date: Date§time: Time§decimal: FixedDecimal<20, 4>

Trait Implementations§

Source§

impl AsEntity for BoundTypes

Source§

impl AsEntity for &BoundTypes

Source§

impl BoundTypesColumnTrait for BoundTypes

Source§

impl Clone for BoundTypes

Source§

fn clone(&self) -> Self

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 Debug for BoundTypes

Source§

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

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

impl Entity for BoundTypes

Source§

type PrimaryKey<'a> = (&'a u8,)

Primary key type. A tuple of field types (or single type) forming the PK.
Source§

fn table() -> &'static TableRef

Table reference matching the #[tank(...)] attributes.
Source§

fn primary_key<'a>(&'a self) -> Self::PrimaryKey<'a>

Extract PK value(s) from self.
Source§

fn primary_key_expr(&self) -> impl Expression

Build an expression matching the PK of self.
Source§

fn row_values(&self) -> impl ExactSizeIterator<Item = Value<'_>>

Values of all persisted columns in declaration order, borrowing from self where possible.
Source§

fn from_row(row: impl Row) -> Result<Self>

Reconstruct Self from a labeled row. Read more
Source§

fn columns() -> &'static [ColumnDef]

All column definitions in declaration order.
Source§

fn row(&self) -> RowOwned

Full row representation with column labels.
Source§

fn create_table( executor: &mut impl Executor, if_not_exists: bool, create_schema: bool, ) -> impl Future<Output = Result<(), Error>> + Send
where Self: Sized,

Create table (and optional schema). Read more
Source§

fn drop_table( executor: &mut impl Executor, if_exists: bool, drop_schema: bool, ) -> impl Future<Output = Result<(), Error>> + Send
where Self: Sized,

Drop the table (and optional schema). Read more
Source§

fn insert_one<E>( executor: &mut impl Executor, entity: E, ) -> impl Future<Output = Result<RowsAffected, Error>> + Send
where E: AsEntity,

Insert a single entity.
Source§

fn insert_many<It>( executor: &mut impl Executor, items: It, ) -> impl Future<Output = Result<RowsAffected, Error>> + Send
where Self: Sized, It: IntoIterator + Send, <It as IntoIterator>::IntoIter: Send, <It as IntoIterator>::Item: AsEntity,

Bulk insert entities.
Source§

fn prepare_find<Exec>( executor: &mut Exec, condition: impl Expression, limit: Option<u32>, ) -> impl Future<Output = Result<Query<<Exec as Executor>::Driver>, Error>> + Send
where Exec: Executor,

Prepare (but do not yet run) a SQL select query. Read more
Source§

fn find_one( executor: &mut impl Executor, condition: impl Expression, ) -> impl Future<Output = Result<Option<Self>, Error>> + Send
where Self: Sized,

Finds the first entity matching a condition expression. Read more
Source§

fn find_many( executor: &mut impl Executor, condition: impl Expression, limit: Option<u32>, ) -> impl Stream<Item = Result<Self, Error>> + Send
where Self: Sized,

Streams entities matching a condition. Read more
Source§

fn delete_many( executor: &mut impl Executor, condition: impl Expression, ) -> impl Future<Output = Result<RowsAffected, Error>> + Send
where Self: Sized,

Deletes all entities matching a condition. Read more
Source§

fn save( &self, executor: &mut impl Executor, ) -> impl Future<Output = Result<(), Error>> + Send
where Self: Sized, &'s Self: for<'s> AsEntity,

Saves the entity (insert or update if available) based on primary key presence. Read more
Source§

fn delete( &self, executor: &mut impl Executor, ) -> impl Future<Output = Result<(), Error>> + Send
where Self: Sized,

Deletes this entity instance via its primary key. Read more
Source§

impl Expression for BoundTypes

Source§

fn write_query( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut AnyQuery, )

Generates the SQL representation of this expression.
Source§

fn accept_visitor( &self, _matcher: &mut dyn ExpressionVisitor, _writer: &dyn SqlWriter, _context: &mut Context, _out: &mut AnyQuery, ) -> bool

Traverses the expression with a visitor. Read more
Source§

fn as_identifier(&self, context: &mut Context) -> String

Renders the expression as a string suitable for use as an identifier.
Source§

impl OpPrecedence for BoundTypes

Source§

fn precedence(&self, _: &dyn SqlWriter) -> i32

Writers parenthesize when child precedence <= operator precedence.
Source§

impl PartialEq for BoundTypes

Source§

fn eq(&self, other: &Self) -> 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 BoundTypes

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> Dataset for T
where &'a T: for<'a> Into<TableRef>,

Source§

fn qualified_columns(&self) -> bool

Should columns be qualified (schema.table.col)?
Source§

fn write_table_name( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut AnyQuery, )

Generates the SQL representation of this dataset for use in a query.
Source§

fn table_ref(&self) -> TableRef

Returns the primary table reference for this dataset.
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.