Levy A.
96e3f7bc5c
refactor: remove magic number
2025-06-11 14:19:06 -03:00
Levy A.
8ecc561cd3
refactor: dereference impl Copy
2025-06-11 14:19:06 -03:00
Levy A.
e7ccb0b707
fix: prevent duplicate columns
2025-06-11 14:19:06 -03:00
Levy A.
e3da5a1f09
fix: clippy
2025-06-11 14:19:06 -03:00
Levy A.
3b36c3e771
refactor
2025-06-11 14:19:06 -03:00
Levy A.
01a680b69e
feat(fuzz)+fix: add schema fuzz testing and fix some bugs
2025-06-11 14:19:06 -03:00
Levy A.
54e8e7f097
fix spacing
2025-06-11 14:19:06 -03:00
Levy A.
b88cb99ff0
fix warnings and some refactoring
2025-06-11 14:19:06 -03:00
Levy A.
1881cd04b5
chore: fmt
2025-06-11 14:19:06 -03:00
Levy A.
49a6ddad97
wip
2025-06-11 14:19:04 -03:00
Levy A.
c2f25b6a1d
fix: proper identifier normalization and column constraints
2025-06-11 14:18:41 -03:00
Levy A.
0bb725899d
fix: set is_rowid_alias
2025-06-11 14:18:41 -03:00
Levy A.
d65fe0f978
refactor: simplification and better names
2025-06-11 14:18:41 -03:00
Levy A.
a7761e431b
fix: escape string literals
2025-06-11 14:18:41 -03:00
Levy A.
41cb13aa74
fix: ignore non-constants
2025-06-11 14:18:41 -03:00
Levy A.
15e0cab8d8
refactor+fix: precompute default values from schema
2025-06-11 14:18:39 -03:00
Levy A.
7638b0dab7
fix: use default value on empty columns added via ALTER TABLE
2025-06-11 14:18:19 -03:00
Levy A.
326a8b39db
fix: default values not being converted to SQL
2025-06-11 14:17:36 -03:00
Levy A.
6945c0c09e
fix+refactor: incorrect label placement
...
also added a `cursor_loop` helper on `ProgramBuilder` to avoid making
this mistake in the future. this is zero-cost, and will be optimized to
the same thing (hopefully).
2025-06-11 14:17:36 -03:00
Levy A.
3bc24eb86f
feat: proper column definition parsing
2025-06-11 14:17:36 -03:00
Levy A.
587cf345cc
refactor: merge branches
2025-06-11 14:17:36 -03:00
Levy A.
65b6984c2a
fix: make sure to not modify a index
2025-06-11 14:17:36 -03:00
Levy A.
5f25ed0738
fix UNIQUE constraints
2025-06-11 14:17:36 -03:00
Levy A.
de2ac89ad2
feat: complete ALTER TABLE implementation
2025-06-11 14:17:36 -03:00
Jussi Saurio
e9d1f0823b
Disable index usage in DELETE because it does not work safely
2025-06-11 12:15:20 +03:00
Krishna Vishal
1c6a65ded4
Change seek op match from unit variants to struct variants.
2025-06-11 00:44:07 +05:30
Krishna Vishal
0d5cbc4f1d
Add affinity check as a function as ast::Operator impl
2025-06-11 00:33:48 +05:30
Krishna Vishal
712c94537c
Add affinity flags to IS and IS NOT opeartors
2025-06-11 00:33:48 +05:30
krishvishal
c8da564aeb
smol edit
2025-06-11 00:33:48 +05:30
krishvishal
5a1da026e6
Unify comparison function to reduce code duplication
2025-06-11 00:33:47 +05:30
krishvishal
5837f7329f
clean up
2025-06-11 00:33:47 +05:30
krishvishal
d13abad4b1
Handle Blob type together with Text type in op_seek
2025-06-11 00:33:47 +05:30
krishvishal
6c04c18f87
Add affinity flag to comparison opcodes
2025-06-11 00:33:47 +05:30
krishvishal
f0dda1702f
Fix AFFINITY_MASK value
2025-06-11 00:33:47 +05:30
krishvishal
faa9aedbae
Add affinity based type coercion to comparison ops
2025-06-11 00:33:47 +05:30
krishvishal
7bd1589615
Added affinity inference and conversion for comparison ops.
...
Added affinity helper function for `CmpInsFlags`
2025-06-11 00:33:44 +05:30
krishvishal
9130b25111
Add jump_if_null flag for rowid alias based seeks
2025-06-11 00:33:05 +05:30
krishvishal
3b2980c7c0
Fix op_seek to handle affinity coercion
2025-06-11 00:33:05 +05:30
krishvishal
e68293a1d1
Add affinity conversion to op_gt, op_le, op_lt, op_eq, op_ne
2025-06-11 00:33:05 +05:30
krishvishal
30ccbe46c7
Added apply_numeric_affinity function to handle string conversion
...
to integer. Exising functions' behavior is tailored to `CAST` ops.
SQLite has different behavior when it comes to handling string to
`integer` conversion in CAST vs predicate ops.
2025-06-11 00:33:05 +05:30
krishvishal
20e6e73057
Fix affinity in op_seek when there's string integer comparison
2025-06-11 00:33:03 +05:30
krishvishal
2171c5f4e1
Added apply_affinity_char to fix bugs in SeekRowId
2025-06-11 00:31:09 +05:30
Jussi Saurio
72058da9dc
Merge 'bindings/javascript: Add pragma() support' from Anton Harniakou
...
This PR adds column names to the ouput of js pragma function.
Reviewed-by: Diego Reis (@el-yawd)
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #1608
2025-06-10 18:24:13 +03:00
Jussi Saurio
4794b022a5
Merge 'Fix incorrect handling of OR clauses in HAVING' from Jussi Saurio
...
thanks to @pedrocarlo for reminding me we have this old-ass bug I never
bothered to fix
Closes #1708
2025-06-10 18:14:39 +03:00
Jussi Saurio
3d50822284
Merge 'fix: Incorrect placeholder label in where clause translation' from Pedro Muniz
...
Closes #1705
Closes #1707
2025-06-10 18:14:04 +03:00
Jussi Saurio
85972fd744
Merge 'Fix rowid to_sql_string' from Pedro Muniz
...
Addresses the panic encountered here:
https://github.com/tursodatabase/limbo/pull/1690 . Sorry about that.
Closes #1693
2025-06-10 18:11:51 +03:00
Jussi Saurio
18dd87eff1
Fix incorrect handling of OR clauses in HAVING
2025-06-10 18:02:14 +03:00
pedrocarlo
80c480517a
incorrect placeholder label in where clause translation
2025-06-10 12:00:19 -03:00
Jussi Saurio
ace1e02fc0
Remove leftover info trace
2025-06-10 16:51:34 +03:00
pedrocarlo
36f60e4dd1
Fix rowid to_sql_string printing
2025-06-10 10:48:05 -03:00