Archived
1
0
Fork 0
This repository has been archived on 2024-07-25. You can view files and clone it, but cannot push or open issues or pull requests.
migra/migra-core/src/database.rs

10 lines
275 B
Rust
Raw Normal View History

2021-01-31 13:39:00 +03:00
use postgres::{Client, NoTls, Error};
pub fn connect(connection_string: &str) -> Result<Client, Error> {
Client::connect(connection_string, NoTls)
}
pub fn apply_sql(client: &mut Client, sql_content: &str) -> Result<(), Error> {
client.batch_execute(sql_content)
}