pub struct SelectBuilder { /* private fields */ }Expand description
SELECT query builder.
Implementations§
Source§impl SelectBuilder
impl SelectBuilder
Sourcepub fn order_by(self, column: &str, order: JsSortOrder) -> Self
pub fn order_by(self, column: &str, order: JsSortOrder) -> Self
Adds an ORDER BY clause.
Sourcepub fn inner_join(self, table: &str, condition: &Expr) -> Self
pub fn inner_join(self, table: &str, condition: &Expr) -> Self
Adds an INNER JOIN.
Sourcepub fn distinct(self, column: &str) -> Self
pub fn distinct(self, column: &str) -> Self
Adds a DISTINCT(column) aggregate (returns count of distinct values).
Sourcepub fn explain(&self) -> Result<JsValue, JsValue>
pub fn explain(&self) -> Result<JsValue, JsValue>
Explains the query plan without executing it.
Returns an object with:
logical: The original logical planoptimized: The optimized logical plan (after index selection, etc.)physical: The final physical execution plan
Sourcepub fn observe(&self) -> Result<JsObservableQuery, JsValue>
pub fn observe(&self) -> Result<JsObservableQuery, JsValue>
Creates an observable query using re-query strategy. When data changes, the cached physical plan is re-executed (no optimization overhead).
Sourcepub fn changes(&self) -> Result<JsChangesStream, JsValue>
pub fn changes(&self) -> Result<JsChangesStream, JsValue>
Creates a changes stream (initial + incremental).
Sourcepub fn get_schema_layout(&self) -> Result<SchemaLayout, JsValue>
pub fn get_schema_layout(&self) -> Result<SchemaLayout, JsValue>
Gets the schema layout for binary decoding. The layout can be cached by JS for repeated queries on the same table.
Sourcepub async fn exec_binary(&self) -> Result<BinaryResult, JsValue>
pub async fn exec_binary(&self) -> Result<BinaryResult, JsValue>
Executes the query and returns a binary result buffer. Use with getSchemaLayout() for zero-copy decoding in JS.
Trait Implementations§
Source§impl From<SelectBuilder> for JsValue
impl From<SelectBuilder> for JsValue
Source§fn from(value: SelectBuilder) -> Self
fn from(value: SelectBuilder) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for SelectBuilder
impl FromWasmAbi for SelectBuilder
Source§impl IntoWasmAbi for SelectBuilder
impl IntoWasmAbi for SelectBuilder
Source§impl LongRefFromWasmAbi for SelectBuilder
impl LongRefFromWasmAbi for SelectBuilder
Source§impl OptionFromWasmAbi for SelectBuilder
impl OptionFromWasmAbi for SelectBuilder
Source§impl OptionIntoWasmAbi for SelectBuilder
impl OptionIntoWasmAbi for SelectBuilder
Source§impl RefFromWasmAbi for SelectBuilder
impl RefFromWasmAbi for SelectBuilder
Source§type Anchor = RcRef<SelectBuilder>
type Anchor = RcRef<SelectBuilder>
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 SelectBuilder
impl RefMutFromWasmAbi for SelectBuilder
Source§impl TryFromJsValue for SelectBuilder
impl TryFromJsValue for SelectBuilder
Source§impl VectorFromWasmAbi for SelectBuilder
impl VectorFromWasmAbi for SelectBuilder
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[SelectBuilder]>
Source§impl VectorIntoWasmAbi for SelectBuilder
impl VectorIntoWasmAbi for SelectBuilder
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[SelectBuilder]>) -> Self::Abi
Source§impl WasmDescribeVector for SelectBuilder
impl WasmDescribeVector for SelectBuilder
impl SupportsConstructor for SelectBuilder
impl SupportsInstanceProperty for SelectBuilder
impl SupportsStaticProperty for SelectBuilder
Auto Trait Implementations§
impl Freeze for SelectBuilder
impl !RefUnwindSafe for SelectBuilder
impl !Send for SelectBuilder
impl !Sync for SelectBuilder
impl Unpin for SelectBuilder
impl !UnwindSafe for SelectBuilder
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.