Back to Turso

Simulator coverage of Turso

testing/simulator/COVERAGE.md

0.5.331.1 KB
Original Source

Simulator coverage of Turso

This document describes how much of the Turso capabilities simulator covers and tests.

Table of contents

SQLite query language

Statements

StatementStatusComment
ALTER TABLEPartialTODO
ANALYZENo
ATTACH DATABASENo
BEGIN TRANSACTIONPartialTODO
COMMIT TRANSACTIONPartialTODO
CREATE INDEXPartialTODO
CREATE TABLEPartialTODO
CREATE TABLE ... STRICTNo
CREATE TRIGGERNo
CREATE VIEWNo
CREATE VIRTUAL TABLENo
DELETEPartialTODO
DETACH DATABASENo
DROP INDEXPartialTODO
DROP TABLEPartialTODO
DROP TRIGGERNo
DROP VIEWNo
END TRANSACTIONPartialTODO
EXPLAINPartial
INDEXED BYNo
INSERTPartialTODO
ON CONFLICT clauseNo
REINDEXNo
RELEASE SAVEPOINTNo
REPLACENo
RETURNING clauseNoTODO
ROLLBACK TRANSACTIONPartialTODO
SAVEPOINTNo
SELECTPartialTODO
SELECT ... WHEREPartialTODO
SELECT ... WHERE ... LIKENo
SELECT ... LIMITPartialTODO
SELECT ... ORDER BYPartialTODO
SELECT ... GROUP BYNo
SELECT ... HAVINGNo
SELECT ... JOINPartialTODO
SELECT ... CROSS JOINNoSQLite CROSS JOIN means "do not reorder joins". We don't support that yet anyway.
SELECT ... INNER JOINPartialTODO
SELECT ... OUTER JOINNo
SELECT ... JOIN USINGNo
SELECT ... NATURAL JOINNo
UPDATEPartial
VACUUMNo
WITH clauseNo
WINDOW functionsNo

PRAGMA

StatementStatusComment
PRAGMA analysis_limitNo
PRAGMA application_idNo
PRAGMA auto_vacuumYes
PRAGMA automatic_indexNo
PRAGMA busy_timeoutNo
PRAGMA busy_timeoutNo
PRAGMA cache_sizeNo
PRAGMA cache_spillNo
PRAGMA case_sensitive_likeNot Neededdeprecated in SQLite
PRAGMA cell_size_checkNo
PRAGMA checkpoint_fullsyncNo
PRAGMA collation_listNo
PRAGMA compile_optionsNo
PRAGMA count_changesNot Neededdeprecated in SQLite
PRAGMA data_store_directoryNot Neededdeprecated in SQLite
PRAGMA data_versionNo
PRAGMA database_listNo
PRAGMA default_cache_sizeNot Neededdeprecated in SQLite
PRAGMA defer_foreign_keysNo
PRAGMA empty_result_callbacksNot Neededdeprecated in SQLite
PRAGMA encodingNo
PRAGMA foreign_key_checkNo
PRAGMA foreign_key_listNo
PRAGMA foreign_keysNo
PRAGMA freelist_countNo
PRAGMA full_column_namesNot Neededdeprecated in SQLite
PRAGMA fullsyncNo
PRAGMA function_listYes
PRAGMA hard_heap_limitNo
PRAGMA ignore_check_constraintsNo
PRAGMA incremental_vacuumNo
PRAGMA index_infoNo
PRAGMA index_listNo
PRAGMA index_xinfoNo
PRAGMA integrity_checkNo
PRAGMA journal_modeNo
PRAGMA journal_size_limitNo
PRAGMA legacy_alter_tableNo
PRAGMA legacy_file_formatNo
PRAGMA locking_modeNo
PRAGMA max_page_countNo
PRAGMA mmap_sizeNo
PRAGMA module_listNo
PRAGMA optimizeNo
PRAGMA page_countNo
PRAGMA page_sizeNo
PRAGMA parser_traceNo
PRAGMA pragma_listNo
PRAGMA query_onlyNo
PRAGMA quick_checkNo
PRAGMA read_uncommittedNo
PRAGMA recursive_triggersNo
PRAGMA reverse_unordered_selectsNo
PRAGMA schema_versionNoFor writes, emulate defensive mode (always noop)
PRAGMA secure_deleteNo
PRAGMA short_column_namesNot Neededdeprecated in SQLite
PRAGMA shrink_memoryNo
PRAGMA soft_heap_limitNo
PRAGMA statsNoUsed for testing in SQLite
PRAGMA synchronousNo
PRAGMA table_infoNo
PRAGMA table_listNo
PRAGMA table_xinfoNo
PRAGMA temp_storeNo
PRAGMA temp_store_directoryNot Neededdeprecated in SQLite
PRAGMA threadsNo
PRAGMA trusted_schemaNo
PRAGMA user_versionNo
PRAGMA vdbe_addoptraceNo
PRAGMA vdbe_debugNo
PRAGMA vdbe_listingNo
PRAGMA vdbe_traceNo
PRAGMA wal_autocheckpointNo
PRAGMA wal_checkpointNo
PRAGMA writable_schemaNo

Expressions

Feature support of sqlite expr syntax.

SyntaxStatusComment
literalsYes
schema.table.columnNo
unary operatorYes
binary operatorPartialTODO
agg() FILTER (WHERE ...)No
... OVER (...)No
(expr)Yes
CAST (expr AS type)No
COLLATENo
(NOT) LIKEYes
(NOT) GLOBNo
(NOT) REGEXPNo
(NOT) MATCHNo
IS (NOT)No
IS (NOT) DISTINCT FROMNo
(NOT) BETWEEN ... AND ...No
(NOT) IN (SELECT...)No
(NOT) EXISTS (SELECT...)No
x <operator> (SELECT...))No
CASE WHEN THEN ELSE ENDNo
RAISENo

SQL functions

Scalar functions

FunctionStatusComment
abs(X)No
changes()No
char(X1,X2,...,XN)No
coalesce(X,Y,...)No
concat(X,...)No
concat_ws(SEP,X,...)No
format(FORMAT,...)No
glob(X,Y)No
hex(X)No
ifnull(X,Y)No
iif(X,Y,Z)No
instr(X,Y)No
last_insert_rowid()No
length(X)No
like(X,Y)No
like(X,Y,Z)No
likelihood(X,Y)No
likely(X)No
load_extension(X)No
load_extension(X,Y)No
lower(X)No
ltrim(X)No
ltrim(X,Y)No
max(X,Y,...)No
min(X,Y,...)No
nullif(X,Y)No
octet_length(X)No
printf(FORMAT,...)No
quote(X)No
random()No
randomblob(N)No
replace(X,Y,Z)No
round(X)No
round(X,Y)No
rtrim(X)No
rtrim(X,Y)No
sign(X)No
soundex(X)No
sqlite_compileoption_get(N)No
sqlite_compileoption_used(X)No
sqlite_offset(X)No
sqlite_source_id()No
sqlite_version()No
substr(X,Y,Z)No
substr(X,Y)No
substring(X,Y,Z)No
substring(X,Y)No
total_changes()No
trim(X)No
trim(X,Y)No
typeof(X)No
unhex(X)No
unhex(X,Y)No
unicode(X)No
unlikely(X)No
upper(X)No
zeroblob(N)No

Mathematical functions

FunctionStatusComment
acos(X)No
acosh(X)No
asin(X)No
asinh(X)No
atan(X)No
atan2(Y,X)No
atanh(X)No
ceil(X)No
ceiling(X)No
cos(X)No
cosh(X)No
degrees(X)No
exp(X)No
floor(X)No
ln(X)No
log(B,X)No
log(X)No
log10(X)No
log2(X)No
mod(X,Y)No
pi()No
pow(X,Y)No
power(X,Y)No
radians(X)No
sin(X)No
sinh(X)No
sqrt(X)No
tan(X)No
tanh(X)No
trunc(X)No

Aggregate functions

FunctionStatusComment
avg(X)No
count()No
count(*)No
group_concat(X)No
group_concat(X,Y)No
string_agg(X,Y)No
max(X)No
min(X)No
sum(X)No
total(X)No

Date and time functions

FunctionStatusComment
date()No
time()No
datetime()No
julianday()No
unixepoch()No
strftime()No
timediff()No

Modifiers:

ModifierStatusComment
DaysYes
HoursYes
MinutesYes
SecondsYes
MonthsYes
YearsYes
TimeOffsetYes
DateOffsetYes
DateTimeOffsetYes
CeilingYes
FloorNo
StartOfMonthYes
StartOfYearYes
StartOfDayYes
Weekday(N)Yes
AutoNo
UnixEpochNo
JulianDayNo
LocaltimePartialrequires fixes to avoid double conversions.
UtcPartialrequires fixes to avoid double conversions.
SubsecYes

JSON functions

FunctionStatusComment
json(json)No
jsonb(json)No
json_array(value1,value2,...)No
jsonb_array(value1,value2,...)No
json_array_length(json)No
json_array_length(json,path)No
json_error_position(json)No
json_extract(json,path,...)No
jsonb_extract(json,path,...)No
json -> pathNo
json ->> pathNo
json_insert(json,path,value,...)No
jsonb_insert(json,path,value,...)No
json_object(label1,value1,...)No
jsonb_object(label1,value1,...)No
json_patch(json1,json2)No
jsonb_patch(json1,json2)No
json_pretty(json)No
json_remove(json,path,...)No
jsonb_remove(json,path,...)No
json_replace(json,path,value,...)No
jsonb_replace(json,path,value,...)No
json_set(json,path,value,...)No
jsonb_set(json,path,value,...)No
json_type(json)No
json_type(json,path)No
json_valid(json)No
json_valid(json,flags)No
json_quote(value)No
json_group_array(value)No
jsonb_group_array(value)No
json_group_object(label,value)No
jsonb_group_object(name,value)No
json_each(json)No
json_each(json,path)No
json_tree(json)No
json_tree(json,path)No

SQLite journaling modes

We currently don't have plan to support the rollback journal mode as it locks the database file during writes. Therefore, all rollback-type modes (delete, truncate, persist, memory) are marked are Not Needed below.

Journal modeStatusComment
walNo
wal2Noexperimental feature in sqlite
deleteNo
truncateNo
persistNo
memoryNo

Extensions

We currently do not support testing any Turso extensions.

UUID

UUID's in Turso are blobs by default.

FunctionStatusComment
uuid4()No
uuid4_str()No
uuid7(X?)No
uuid7_timestamp_ms(X)No
uuid_str(X)No
uuid_blob(X)No

regexp

The regexp extension is compatible with sqlean-regexp.

FunctionStatusComment
regexp(pattern, source)No
regexp_like(source, pattern)No
regexp_substr(source, pattern)No
regexp_capture(source, pattern[, n])No
regexp_replace(source, pattern, replacement)No

Vector

The vector extension is compatible with libSQL native vector search.

FunctionStatusComment
vector(x)No
vector32(x)No
vector64(x)No
vector_extract(x)No
vector_distance_cos(x, y)No
vector_distance_l2(x, y)No
vector_concat(x, y)No
vector_slice(x, start_index, end_index)No

Time

FunctionStatusComment
time_now()No
time_date(year, month, day[, hour, min, sec[, nsec[, offset_sec]]])No
time_get_year(t)No
time_get_month(t)No
time_get_day(t)No
time_get_hour(t)No
time_get_minute(t)No
time_get_second(t)No
time_get_nano(t)No
time_get_weekday(t)No
time_get_yearday(t)No
time_get_isoyear(t)No
time_get_isoweek(t)No
time_get(t, field)No
time_unix(sec[, nsec])No
time_milli(msec)No
time_micro(usec)No
time_nano(nsec)No
time_to_unix(t)No
time_to_milli(t)No
time_to_micro(t)No
time_to_nano(t)No
time_after(t, u)No
time_before(t, u)No
time_compare(t, u)No
time_equal(t, u)No
time_add(t, d)No
time_add_date(t, years[, months[, days]])No
time_sub(t, u)No
time_since(t)No
time_until(t)No
time_trunc(t, field)No
time_trunc(t, d)No
time_round(t, d)No
time_fmt_iso(t[, offset_sec])No
time_fmt_datetime(t[, offset_sec])No
time_fmt_date(t[, offset_sec])No
time_fmt_time(t[, offset_sec])No
time_parse(s)No
dur_ns()No
dur_us()No
dur_ms()No
dur_s()No
dur_m()No
dur_h()No