added more support for supabase-js

This commit is contained in:
2026-03-12 10:18:52 +02:00
parent c0792f2e1d
commit 6708cf28a7
62 changed files with 6563 additions and 526 deletions

View File

@@ -406,11 +406,19 @@ fn rows_to_json(rows: Vec<sqlx::postgres::PgRow>) -> Vec<Value> {
Value::Null
}
} else if type_name == "TIMESTAMP" {
if let Ok(ts) = row.try_get::<chrono::NaiveDateTime, _>(name) {
if let Ok(ts) = row.try_get::<chrono::NaiveDateTime, _>(name) {
json!(ts.to_string())
} else {
Value::Null
}
} else if type_name == "VECTOR" {
match row.try_get::<String, _>(name) {
Ok(s) => {
// Parse string "[1,2,3]" to JSON array
serde_json::from_str(&s).unwrap_or(json!(s))
},
Err(_) => Value::Null,
}
} else {
// Fallback for types that can't be directly read as String
match row.try_get::<String, _>(name) {