Nikita Sivukhin
f61d733dd3
make new functions dependend on "json" Cargo feature
2025-07-14 11:26:51 +04:00
Nikita Sivukhin
c9e7271eaf
properly pass subtype
2025-07-14 11:20:49 +04:00
Nikita Sivukhin
bf25a0e3f1
fix clippy
2025-07-14 11:20:16 +04:00
Nikita Sivukhin
81cd04dd65
add bin_record_json_object and table_columns_json_array functions
2025-07-14 11:19:45 +04:00
Nikita Sivukhin
eed89993f9
fix clippy
2025-07-14 11:17:32 +04:00
Nikita Sivukhin
5409812610
properly implement generation of before/after records for new modes
2025-07-14 11:17:32 +04:00
Nikita Sivukhin
9e04102a94
add basic cdc tests for new modes
2025-07-14 11:17:31 +04:00
Nikita Sivukhin
fabb00f385
fix test
2025-07-14 11:16:06 +04:00
Nikita Sivukhin
b258c10c9a
generate before/after row values in modification statements
2025-07-14 11:16:06 +04:00
Nikita Sivukhin
9129991b62
add id,before,after,full modes
2025-07-14 11:16:06 +04:00
Pekka Enberg
8f8d582b4a
Merge 'Ignore double quotes around table names' from Zaid Humayun
...
This PR normalizes the table name identifier by removing quotes to
improve SQLite compatibility. Fixes
https://github.com/tursodatabase/turso/issues/1964
<img width="545" height="175" alt="Screenshot 2025-07-13 at 5 12 23 PM"
src="https://github.com/user-
attachments/assets/10952fc7-9ade-4c97-a427-385ff2dc3b44" />
<img width="384" height="110" alt="Screenshot 2025-07-13 at 5 12 32 PM"
src="https://github.com/user-
attachments/assets/5d87e0fe-72a4-4472-abc3-24c0d4cc8add" />
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #2069
2025-07-14 10:04:59 +03:00
Krishna Vishal
370d437491
Add docs for get_tie_breaker_from_idx_comp_op
2025-07-14 03:28:55 +05:30
Krishna Vishal
4c5383b0b3
chore: clippy
2025-07-14 03:28:55 +05:30
Krishna Vishal
e27b9c7e0f
Address review comments
2025-07-14 03:28:55 +05:30
Krishna Vishal
a79fe458db
Fix merge conflicts and adapt schema.rs to use RecordCursor
2025-07-14 03:28:55 +05:30
Krishna Vishal
ea4a4708ea
- Address some review comments
...
- Add docs for `RecordCursor`
2025-07-14 03:28:55 +05:30
Krishna Vishal
b1f27cad94
chore: fix clippy
2025-07-14 03:28:55 +05:30
Krishna Vishal
d3368a28bc
fix merge conflicts
2025-07-14 03:28:55 +05:30
Krishna Vishal
894bdca05f
refactor: change ImmutableRecord payload to Value for compatibility
2025-07-14 03:28:54 +05:30
Krishna Vishal
d78185bd62
Remove mistakenly pushed file
2025-07-14 03:28:54 +05:30
Krishna Vishal
9de3cf0c60
Remove redundant checks
2025-07-14 03:28:54 +05:30
Krishna Vishal
235e798561
Return corrupt errors.
2025-07-14 03:28:54 +05:30
Krishna Vishal
9393aba0bd
Add docs for RecordCompare
2025-07-14 03:28:54 +05:30
Krishna Vishal
e7e5f28c0a
chore: Clippy chill
2025-07-14 03:28:54 +05:30
Krishna Vishal
f3b169bf30
Fix empty blob test failure.
2025-07-14 03:28:54 +05:30
Krishna Vishal
9b315d1d7e
Manually inline the record deserialization code for performance.
...
This is done because the compiler is refusing to inline even after
adding inline hint.
- Get refvalues from directly from registers without using
`make_record`
2025-07-14 03:28:54 +05:30
Krishna Vishal
35ed279644
Clean up indexbtree_move_to
2025-07-14 03:28:54 +05:30
Krishna Vishal
dca4e669f7
Reduce allocations in compare_records_generic
2025-07-14 03:28:54 +05:30
Krishna Vishal
f0e8e5871b
Replace compare_immutable with compare_records_generic
2025-07-14 03:28:54 +05:30
Krishna Vishal
860de412d9
Add num_columns to BTreeCursor so we can initialize
...
`Vecs` inside `RecordCursor` to their appropriate to reduce
allocations.
2025-07-14 03:28:54 +05:30
Krishna Vishal
ef147181c2
Working version of the incremental column and "optimal" record
...
compare functions. Now we optimize them
2025-07-14 03:28:54 +05:30
Krishna Vishal
692f0413eb
Stash
2025-07-14 03:28:54 +05:30
Krishna Vishal
0b1ed44c1f
Add optimized index record compare methods
...
compare_records_int
compare_records_string
compare_records_generic
comapre_records_generic will still be more efficient than compare-
_immutable because it deserializes the record column by column
2025-07-14 03:28:54 +05:30
Krishna Vishal
c7aa3c3d93
Fix btree to invalidate RecordCursor
...
Use `read_value` instead of `deserialize_column_data`
Add `sqlite_int_float_compare` which takes care of out of range
floats
2025-07-14 03:28:54 +05:30
Krishna Vishal
515712b7f2
Fix sorter
2025-07-14 03:28:54 +05:30
Krishna Vishal
601540af6e
Make OP_column do on demand serialization baby!
2025-07-14 03:28:54 +05:30
Krishna Vishal
2323763a4f
Integrate incremental column parsing into btree.rs
2025-07-14 03:28:54 +05:30
Krishna Vishal
6c5b95a8d7
Add get_values methods to ImmutableRecord
2025-07-14 03:28:54 +05:30
Krishna Vishal
35fa9b368c
Decouple Value parsing and Record loading.
...
Introduced `RecordCursor`, using which we can parse the record
header incrementally.
2025-07-14 03:28:54 +05:30
Krishna Vishal
180bcc7b60
Add incremental and on-demand parsing of ImmutableRecord.
...
First step at resolving the currently wasteful eager parsing.
2025-07-14 03:28:54 +05:30
Zaid Humayun
9dd746d1ce
fixes issues where double quotes are not removed from around table nam
2025-07-13 17:26:58 +05:30
Jussi Saurio
a48b6d049a
Another post-rebase clippy round with 1.88.0
2025-07-12 19:10:56 +03:00
Nils Koch
1a91966c7e
fix clippy errors for rust 1.88.0 (manual fix)
2025-07-12 18:58:55 +03:00
Nils Koch
828d4f5016
fix clippy errors for rust 1.88.0 (auto fix)
2025-07-12 18:58:41 +03:00
Pekka Enberg
416ab28c2c
Merge 'parse_schema_rows optimizations' from Levy A.
...
- Also added a benchmark for opening databases, the main thing that is
slowing `Database::open_file` is `parse_schema_rows`.
- `to_uppercase` was being called multiple times, leaving a relevant
mark on stack traces due to multiple allocations. `make_ascii_upper`
reuses the memory and is faster due to not handling unicode characters
(still compatible with sqlite).
- Do direct btree calls instead of creating a program for updating
`Schema` with `Schema::make_from_btree`.
- Faster type substr comparison using fixed size `u8` slices.
<img width="952" height="507" alt="image" src="https://github.com/user-
attachments/assets/0d0c52ff-05a1-431e-a93d-e333b53c0bb8" />
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #2042
2025-07-12 09:11:20 +03:00
Levy A.
a1e418c999
fix tests
2025-07-11 15:04:28 -03:00
Levy A.
b1341113d7
clippy
2025-07-11 15:04:28 -03:00
Levy A.
b008c787b7
faster type substr comparison
2025-07-11 15:04:28 -03:00
Levy A.
c300a01120
fix: add space between column name and type
2025-07-11 15:04:28 -03:00
Levy A.
cc17211189
direct btree calls
2025-07-11 15:04:28 -03:00