mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-22 08:25:29 +01:00
Shrink shell help msg and replace hardcoded path for shell tests
This commit is contained in:
2
Makefile
2
Makefile
@@ -61,7 +61,7 @@ test: limbo test-compat test-sqlite3 test-shell
|
||||
.PHONY: test
|
||||
|
||||
test-shell: limbo
|
||||
./testing/shelltests.py
|
||||
SQLITE_EXEC=$(SQLITE_EXEC) ./testing/shelltests.py
|
||||
.PHONY: test-shell
|
||||
|
||||
test-compat:
|
||||
|
||||
@@ -646,7 +646,6 @@ fn get_io(db: &str) -> anyhow::Result<Arc<dyn limbo_core::IO>> {
|
||||
const HELP_MSG: &str = r#"
|
||||
Limbo SQL Shell Help
|
||||
==============
|
||||
|
||||
Welcome to the Limbo SQL Shell! You can execute any standard SQL command here.
|
||||
In addition to standard SQL commands, the following special commands are available:
|
||||
|
||||
@@ -689,12 +688,6 @@ Usage Examples:
|
||||
8. Show the current values of settings:
|
||||
.show
|
||||
|
||||
9. Set the value 'NULL' to be displayed for null values instead of empty string:
|
||||
.nullvalue "NULL"
|
||||
|
||||
Note:
|
||||
-----
|
||||
- All SQL commands must end with a semicolon (;).
|
||||
- Special commands do not require a semicolon.
|
||||
|
||||
"#;
|
||||
- Special commands do not require a semicolon."#;
|
||||
|
||||
10
core/util.rs
10
core/util.rs
@@ -217,6 +217,8 @@ pub fn exprs_are_equivalent(expr1: &Expr, expr2: &Expr) -> bool {
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
(Expr::NotNull(expr1), Expr::NotNull(expr2)) => exprs_are_equivalent(expr1, expr2),
|
||||
(Expr::IsNull(expr1), Expr::IsNull(expr2)) => exprs_are_equivalent(expr1, expr2),
|
||||
(Expr::Literal(lit1), Expr::Literal(lit2)) => check_literal_equivalency(lit1, lit2),
|
||||
(Expr::Id(id1), Expr::Id(id2)) => check_ident_equivalency(&id1.0, &id2.0),
|
||||
(Expr::Unary(op1, expr1), Expr::Unary(op2, expr2)) => {
|
||||
@@ -233,6 +235,14 @@ pub fn exprs_are_equivalent(expr1: &Expr, expr2: &Expr) -> bool {
|
||||
(Expr::Parenthesized(exprs1), exprs2) | (exprs2, Expr::Parenthesized(exprs1)) => {
|
||||
exprs1.len() == 1 && exprs_are_equivalent(&exprs1[0], exprs2)
|
||||
}
|
||||
(Expr::Qualified(tn1, cn1), Expr::Qualified(tn2, cn2)) => {
|
||||
check_ident_equivalency(&tn1.0, &tn2.0) && check_ident_equivalency(&cn1.0, &cn2.0)
|
||||
}
|
||||
(Expr::DoublyQualified(sn1, tn1, cn1), Expr::DoublyQualified(sn2, tn2, cn2)) => {
|
||||
check_ident_equivalency(&sn1.0, &sn2.0)
|
||||
&& check_ident_equivalency(&tn1.0, &tn2.0)
|
||||
&& check_ident_equivalency(&cn1.0, &cn2.0)
|
||||
}
|
||||
(
|
||||
Expr::InList {
|
||||
lhs: lhs1,
|
||||
|
||||
@@ -3,7 +3,7 @@ import os
|
||||
import subprocess
|
||||
|
||||
# Configuration
|
||||
sqlite_exec = "./target/debug/limbo"
|
||||
sqlite_exec = os.getenv("SQLITE_EXEC", "./target/debug/limbo")
|
||||
cwd = os.getcwd()
|
||||
|
||||
# Initial setup commands
|
||||
|
||||
Reference in New Issue
Block a user