mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-08 18:54:21 +01:00
Merge 'Add support for substr scalar function' from Kim Seon Woo
Add support for `substr` scalar function. We can reuse the `substring` logic which is already implemted. ## Related issue https://github.com/penberg/limbo/issues/144 Closes #289
This commit is contained in:
@@ -255,6 +255,22 @@ do_execsql_test max-null {
|
||||
select max(null,null)
|
||||
} {}
|
||||
|
||||
do_execsql_test substr-3-args {
|
||||
SELECT substr('limbo', 1, 3);
|
||||
} {lim}
|
||||
|
||||
do_execsql_test substr-3-args-exceed-length {
|
||||
SELECT substr('limbo', 1, 10);
|
||||
} {limbo}
|
||||
|
||||
do_execsql_test substr-3-args-start-exceed-length {
|
||||
SELECT substr('limbo', 10, 3);
|
||||
} {}
|
||||
|
||||
do_execsql_test substr-2-args {
|
||||
SELECT substr('limbo', 3);
|
||||
} {mbo}
|
||||
|
||||
do_execsql_test substring-3-args {
|
||||
SELECT substring('limbo', 1, 3);
|
||||
} {lim}
|
||||
|
||||
Reference in New Issue
Block a user