MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / preferred_server

Function preferred_server

examples/tauri-sqlx-vanilla/src-tauri/src/bench.rs:332–342  ·  view source on GitHub ↗
(root: PathBuf)

Source from the content-addressed store, hash-verified

330}
331
332fn preferred_server(root: PathBuf) -> Result<PgliteServer> {
333 let builder = PgliteServer::builder().path(&root);
334 #[cfg(unix)]
335 {
336 builder.unix(root.join(".s.PGSQL.5432")).start()
337 }
338 #[cfg(not(unix))]
339 {
340 builder.start()
341 }
342}
343
344fn pg_connect_options(server: &PgliteServer) -> Result<PgConnectOptions> {
345 let options = PgConnectOptions::new()

Callers 1

startMethod · 0.85

Calls 4

unixMethod · 0.80
pathMethod · 0.45
startMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected