pub struct JsTableBuilder { /* private fields */ }Expand description
JavaScript-friendly table builder.
Implementations§
Source§impl JsTableBuilder
impl JsTableBuilder
Sourcepub fn column(
self,
name: &str,
data_type: JsDataType,
options: Option<ColumnOptions>,
) -> Self
pub fn column( self, name: &str, data_type: JsDataType, options: Option<ColumnOptions>, ) -> Self
Adds a column to the table.
Sourcepub fn primary_key(self, columns: &JsValue) -> Self
pub fn primary_key(self, columns: &JsValue) -> Self
Sets the primary key columns.
Sourcepub fn unique_index(self, name: &str, columns: &JsValue) -> Self
pub fn unique_index(self, name: &str, columns: &JsValue) -> Self
Adds a unique index to the table.
Sourcepub fn jsonb_index(self, column: &str, _paths: &JsValue) -> Self
pub fn jsonb_index(self, column: &str, _paths: &JsValue) -> Self
Adds a JSONB index for specific paths.
Trait Implementations§
Source§impl From<JsTableBuilder> for JsValue
impl From<JsTableBuilder> for JsValue
Source§fn from(value: JsTableBuilder) -> Self
fn from(value: JsTableBuilder) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsTableBuilder
impl FromWasmAbi for JsTableBuilder
Source§impl IntoWasmAbi for JsTableBuilder
impl IntoWasmAbi for JsTableBuilder
Source§impl LongRefFromWasmAbi for JsTableBuilder
impl LongRefFromWasmAbi for JsTableBuilder
Source§impl OptionFromWasmAbi for JsTableBuilder
impl OptionFromWasmAbi for JsTableBuilder
Source§impl OptionIntoWasmAbi for JsTableBuilder
impl OptionIntoWasmAbi for JsTableBuilder
Source§impl RefFromWasmAbi for JsTableBuilder
impl RefFromWasmAbi for JsTableBuilder
Source§type Anchor = RcRef<JsTableBuilder>
type Anchor = RcRef<JsTableBuilder>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for JsTableBuilder
impl RefMutFromWasmAbi for JsTableBuilder
Source§impl TryFromJsValue for JsTableBuilder
impl TryFromJsValue for JsTableBuilder
Source§impl VectorFromWasmAbi for JsTableBuilder
impl VectorFromWasmAbi for JsTableBuilder
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsTableBuilder]>
Source§impl VectorIntoWasmAbi for JsTableBuilder
impl VectorIntoWasmAbi for JsTableBuilder
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsTableBuilder]>) -> Self::Abi
Source§impl WasmDescribeVector for JsTableBuilder
impl WasmDescribeVector for JsTableBuilder
impl SupportsConstructor for JsTableBuilder
impl SupportsInstanceProperty for JsTableBuilder
impl SupportsStaticProperty for JsTableBuilder
Auto Trait Implementations§
impl Freeze for JsTableBuilder
impl RefUnwindSafe for JsTableBuilder
impl Send for JsTableBuilder
impl Sync for JsTableBuilder
impl Unpin for JsTableBuilder
impl UnwindSafe for JsTableBuilder
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.