Struct reql::Session [−][src]
pub struct Session { /* fields omitted */ }
The connection object returned by r.connect()
Implementations
impl Session
[src]
impl Session
[src]pub fn connection(&self) -> Result<Connection>
[src]
pub async fn use<T>(&mut self, db_name: T) where
T: StaticString,
[src]
T: StaticString,
Change the default database on this connection
Example
Change the default database so that we don’t need to specify the database when referencing a table.
conn.r#use("marvel").await; r.table("heroes").run(conn) // refers to r.db("marvel").table("heroes")
Related commands
pub async fn noreply_wait(&self) -> Result<()>
[src]
Ensures that previous queries with the noreply
flag have been
processed by the server
Note that this guarantee only applies to queries run on the given connection.
Example
We have previously run queries with noreply
set to true
. Now wait until the server has processed them.
session.noreply_wait().await
pub async fn server(&self) -> Result<ServerInfo>
[src]
Trait Implementations
impl Arg for &Session
[src]
impl Arg for &Session
[src]fn into_run_opts(self) -> Result<(Connection, Options)>
[src]
impl Arg for &mut Session
[src]
impl Arg for &mut Session
[src]fn into_run_opts(self) -> Result<(Connection, Options)>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Session
impl !RefUnwindSafe for Session
impl !UnwindSafe for Session
impl !UnwindSafe for Session