MCPcopy Create free account
hub / github.com/erans/pgsqlite / execute_generic

Method execute_generic

src/query/extended.rs:5697–5713  ·  view source on GitHub ↗
(
        framed: &mut Framed<T, crate::protocol::PostgresCodec>,
        db: &Arc<DbHandler>,
        session: &Arc<SessionState>,
        query: &str,
    )

Source from the content-addressed store, hash-verified

5695 }
5696
5697 async fn execute_generic<T>(
5698 framed: &mut Framed<T, crate::protocol::PostgresCodec>,
5699 db: &Arc<DbHandler>,
5700 session: &Arc<SessionState>,
5701 query: &str,
5702 ) -> Result<(), PgSqliteError>
5703 where
5704 T: tokio::io::AsyncRead + tokio::io::AsyncWrite + Unpin,
5705 {
5706 let cached_conn = Self::get_or_cache_connection(session, db).await;
5707 db.execute_with_session_cached(query, &session.id, cached_conn.as_ref()).await?;
5708
5709 framed.send(BackendMessage::CommandComplete { tag: "OK".to_string() }).await
5710 .map_err(PgSqliteError::Io)?;
5711
5712 Ok(())
5713 }
5714
5715 /// Analyze INSERT query to determine parameter types from schema
5716 async fn analyze_insert_params(query: &str, db: &Arc<DbHandler>) -> Result<(Vec<i32>, Vec<i32>), PgSqliteError> {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected