test for get by position

This commit is contained in:
filipriec
2025-03-05 19:36:48 +01:00
parent af37c6c0bb
commit 70038feb49
4 changed files with 320 additions and 0 deletions

View File

@@ -120,6 +120,8 @@ pub async fn post_table_data(
.ok_or_else(|| Status::invalid_argument(format!("Column not found: {}", col)))?
};
// TODO This needs heavy adjustement. More stuff to be added for user to only pick
// preprogrammed functions
match sql_type {
"TEXT" | "VARCHAR(15)" | "VARCHAR(255)" => {
if let Some(max_len) = sql_type.strip_prefix("VARCHAR(")

View File

@@ -103,6 +103,7 @@ pub async fn put_table_data(
.ok_or_else(|| Status::invalid_argument(format!("Column not found: {}", col)))?
};
// TODO strong testing by user pick in the future
match sql_type {
"TEXT" | "VARCHAR(15)" | "VARCHAR(255)" => {
if let Some(max_len) = sql_type.strip_prefix("VARCHAR(")