Skip to content

Commit

Permalink
Add support for libsql protocol (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilpriver authored Jun 17, 2024
1 parent 225994b commit 74680ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub enum Database {
impl Database {
pub fn new(s: &str) -> Result<Database> {
match s {
"https" | "http" => Ok(Database::LibSQL),
"https" | "http" | "libsql" => Ok(Database::LibSQL),
"psql" | "postgres" | "postgresql" => Ok(Database::Postgres),
"mariadb" => Ok(Database::MariaDB),
"mysql" => Ok(Database::MySQL),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/database_drivers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub async fn new(
let scheme = parsed_db_url.scheme();

match scheme {
"http" | "https" => {
"http" | "https" | "libsql" => {
let driver = libsql::LibSQLDriver::new(
&parsed_db_url.to_string(),
db_token,
Expand Down

0 comments on commit 74680ed

Please sign in to comment.