feat(query): add manual transaction controls

This commit is contained in:
Abeautifulsnow authored and GitHub committed 2026-07-02 01:30:31 +08:00
1 parent f871e00330
commit d55a708d6a
27 files changed
+927 -40

No files matched your search

+2 -2
View File
@@ -218,7 +218,7 @@ fn mysql_bytes_to_json(bytes: Vec<u8>, column: &mysql_async::Column) -> serde_js
/// Map a MySQL column to a user-facing type name for the result-grid header.
/// Returns the bare lowercase type name (no length/precision/signedness), which
/// is enough for display; unknown variants fall back to a lowercased debug name.
fn mysql_column_type_name(ty: ColumnType) -> String {
pub(crate) fn mysql_column_type_name(ty: ColumnType) -> String {
use mysql_async::consts::ColumnType::*;
match ty {
MYSQL_TYPE_TINY => "tinyint",
@@ -251,7 +251,7 @@ fn mysql_column_type_name(ty: ColumnType) -> String {
.to_string()
}
fn mysql_value_to_json(row: &mysql_async::Row, idx: usize) -> serde_json::Value {
pub(crate) fn mysql_value_to_json(row: &mysql_async::Row, idx: usize) -> serde_json::Value {
let Some(column) = row.columns_ref().get(idx) else {
return serde_json::Value::Null;
};
+1 -1
View File
@@ -304,7 +304,7 @@ fn format_pg_timestamptz(value: DateTime<Local>) -> String {
value.to_rfc3339()
}
fn pg_value_to_json(row: &Row, idx: usize, type_name: &str) -> serde_json::Value {
pub(crate) fn pg_value_to_json(row: &Row, idx: usize, type_name: &str) -> serde_json::Value {
let upper = type_name.to_uppercase();
if upper == "BYTEA" {