pub struct Connection { /* private fields */ }
Expand description
A connection to a database. This represents a (client) connection that can be used to query the database.
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn register_table_function(
&self,
table_function: TableFunction,
) -> Result<(), Box<dyn Error>>
pub fn register_table_function( &self, table_function: TableFunction, ) -> Result<(), Box<dyn Error>>
Register the table function object within the given connection.
The function requires at least a name, a bind function, an init function and a main function.
If the function is incomplete or a function with this name already exists DuckDBError is returned.
§Arguments
function
: The function pointer returns: Whether or not the registration was successful.
Sourcepub fn get_ptr(&self) -> duckdb_connection
pub fn get_ptr(&self) -> duckdb_connection
Returns the internal connection pointer
Trait Implementations§
Source§impl Debug for Connection
impl Debug for Connection
Source§impl Drop for Connection
impl Drop for Connection
Source§impl From<*mut c_void> for Connection
impl From<*mut c_void> for Connection
Source§fn from(ptr: duckdb_connection) -> Self
fn from(ptr: duckdb_connection) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl !Send for Connection
impl !Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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