pub struct GenericSQLVirtualServerModel { /* private fields */ }Expand description
JavaScript-facing DuckDB SQL query builder.
This struct wraps the Rust DuckDBSqlBuilder and exposes it to JavaScript
via wasm_bindgen.
Implementations§
Source§impl GenericSQLVirtualServerModel
impl GenericSQLVirtualServerModel
Sourcepub fn new(
args: Option<JsGenericSQLVirtualServerModelArgs>,
) -> Result<Self, JsValue>
pub fn new( args: Option<JsGenericSQLVirtualServerModelArgs>, ) -> Result<Self, JsValue>
Creates a new JsDuckDBSqlBuilder instance.
Sourcepub fn get_hosted_tables(&self) -> Result<String, JsValue>
pub fn get_hosted_tables(&self) -> Result<String, JsValue>
Returns the SQL query to list all hosted tables.
Sourcepub fn table_schema(&self, table_id: &str) -> Result<String, JsValue>
pub fn table_schema(&self, table_id: &str) -> Result<String, JsValue>
Returns the SQL query to describe a table’s schema.
Sourcepub fn table_size(&self, table_id: &str) -> Result<String, JsValue>
pub fn table_size(&self, table_id: &str) -> Result<String, JsValue>
Returns the SQL query to get the row count of a table.
Sourcepub fn view_column_size(&self, view_id: &str) -> Result<String, JsValue>
pub fn view_column_size(&self, view_id: &str) -> Result<String, JsValue>
Returns the SQL query to get the column count of a view.
Sourcepub fn table_validate_expression(
&self,
table_id: &str,
expression: &str,
) -> Result<String, JsValue>
pub fn table_validate_expression( &self, table_id: &str, expression: &str, ) -> Result<String, JsValue>
Returns the SQL query to validate an expression against a table.
Sourcepub fn view_delete(&self, view_id: &str) -> Result<String, JsValue>
pub fn view_delete(&self, view_id: &str) -> Result<String, JsValue>
Returns the SQL query to delete a view.
Sourcepub fn table_make_view(
&self,
table_id: &str,
view_id: &str,
config: JsValue,
) -> Result<String, JsValue>
pub fn table_make_view( &self, table_id: &str, view_id: &str, config: JsValue, ) -> Result<String, JsValue>
Returns the SQL query to create a view from a table with the given configuration.
Sourcepub fn view_get_data(
&self,
view_id: &str,
config: JsValue,
viewport: JsValue,
schema: JsValue,
) -> Result<String, JsValue>
pub fn view_get_data( &self, view_id: &str, config: JsValue, viewport: JsValue, schema: JsValue, ) -> Result<String, JsValue>
Returns the SQL query to fetch data from a view with the given viewport.
Trait Implementations§
Source§impl From<GenericSQLVirtualServerModel> for JsValue
impl From<GenericSQLVirtualServerModel> for JsValue
Source§fn from(value: GenericSQLVirtualServerModel) -> Self
fn from(value: GenericSQLVirtualServerModel) -> Self
Converts to this type from the input type.
Source§impl RefFromWasmAbi for GenericSQLVirtualServerModel
impl RefFromWasmAbi for GenericSQLVirtualServerModel
Source§type Anchor = RcRef<GenericSQLVirtualServerModel>
type Anchor = RcRef<GenericSQLVirtualServerModel>
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 VectorFromWasmAbi for GenericSQLVirtualServerModel
impl VectorFromWasmAbi for GenericSQLVirtualServerModel
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[GenericSQLVirtualServerModel]>
Source§impl VectorIntoWasmAbi for GenericSQLVirtualServerModel
impl VectorIntoWasmAbi for GenericSQLVirtualServerModel
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[GenericSQLVirtualServerModel]>) -> Self::Abi
Source§impl WasmDescribeVector for GenericSQLVirtualServerModel
impl WasmDescribeVector for GenericSQLVirtualServerModel
impl SupportsConstructor for GenericSQLVirtualServerModel
impl SupportsInstanceProperty for GenericSQLVirtualServerModel
impl SupportsStaticProperty for GenericSQLVirtualServerModel
Auto Trait Implementations§
impl Freeze for GenericSQLVirtualServerModel
impl RefUnwindSafe for GenericSQLVirtualServerModel
impl Send for GenericSQLVirtualServerModel
impl Sync for GenericSQLVirtualServerModel
impl Unpin for GenericSQLVirtualServerModel
impl UnwindSafe for GenericSQLVirtualServerModel
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§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.