MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / get_sqlite_connection

Function get_sqlite_connection

aiscript-runtime/src/lib.rs:144–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142}
143
144pub async fn get_sqlite_connection() -> Option<SqlitePool> {
145 let config = Config::get();
146 match config.database.get_sqlite_url() {
147 Some(url) => SqlitePoolOptions::new()
148 .max_connections(5)
149 .connect(&url)
150 .await
151 .ok(),
152 None => None,
153 }
154}
155
156pub async fn get_redis_connection() -> Option<redis::aio::MultiplexedConnection> {
157 let config = Config::get();

Callers 2

mainFunction · 0.85
run_serverFunction · 0.85

Calls 2

getFunction · 0.85
get_sqlite_urlMethod · 0.80

Tested by

no test coverage detected