Piotr Jastrzebski
73e037afa2
Add tests for hes_rowid field
...
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 14:52:20 +02:00
Piotr Jastrzebski
50ecea0c86
Use has_rowid in column_is_rowid_alias
...
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 14:52:20 +02:00
Piotr Jastrzebski
2aa0a92955
Setup has_rowid correctly for BTreeTable
...
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 14:52:00 +02:00
Piotr Jastrzebski
9ddb0befc4
Add has_rowid field to BTreeTable
...
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 14:32:28 +02:00
Piotr Jastrzebski
708cae99b8
Simplify BTreeTable::to_sql
...
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 13:15:04 +02:00
Piotr Jastrzebski
8ce1c4a1ab
Mark test code cfg(test) instead of allow(dead_code)
...
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 12:59:06 +02:00
Pekka Enberg
30ec86a81e
Add sorter utility functions and opcodes
...
This adds basic in-memory sorting utility functions, similar to SQLite's
src/vdbesort.c. We need to improve this later with external sorting so
to support large data sets.
This also adds sorting functionality to the VDBE. Note that none of this
is wired to SQL translation yet so it's unused for now.
2024-07-07 13:56:55 +03:00
Pekka Enberg
dac8f4dcba
Format source code with cargo fmt
2024-07-07 12:28:02 +03:00
Pekka Enberg
519e6b141f
Add Table::column_is_rowid_alias() helper
...
We need to check for rowid alias elsewhere too with ORDER BY, for
example, so let's extract a small helper for that.
2024-07-07 12:27:08 +03:00
Piotr Jastrzebski
fdbd010d89
Remove incorrect Column::is_rowid_alias
...
Fixes #83
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 10:06:45 +02:00
Piotr Jastrzebski
7b6c6ef9f1
Remove unneeded clone in add_table
...
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 08:47:47 +02:00
Pere Diaz Bou
9242e5c671
core: fix agg function uppercase parsing
...
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-03 08:56:30 +02:00
Pekka Enberg
828fb813a8
core: Fix codegen for rowid alias
...
We should emit `Column` bytecode for a primary key, unless it is an alias for a rowid.
2024-06-21 13:10:21 +03:00
Pekka Enberg
8d4d2f32ee
core: Fix INTEGER data type detection
2024-06-21 13:09:43 +03:00
Pekka Enberg
a3c4efc13a
Random code cleanups
2024-06-08 08:38:11 +03:00
Pekka Enberg
a9eb6918d3
SELECT expression support
2024-03-28 19:41:21 +02:00
Pekka Enberg
9a73ded4fa
Add a Cursor trait and use it
...
We need an abstract cursor trait to implement a sorter, for example.
2024-03-28 15:01:52 +02:00
Pekka Enberg
88f335db16
Fix SQL identifiers to be case insensitive
...
SQLite seems to treat everything as case insensitive so let's do that
too.
Fixes #37
2024-03-27 21:00:47 +02:00
Pekka Enberg
81f003d29f
Extract create_table() function
2024-03-27 20:44:52 +02:00
Pekka Enberg
2c55cc797d
cargo clippy --fix
2024-01-28 10:21:38 +02:00
Pekka Enberg
a2202ed31e
Implement reading primary key columns
2023-09-10 13:19:17 +03:00
Pekka Enberg
25ab9afd65
Silence function not used warning
2023-09-10 12:43:08 +03:00
Pekka Enberg
0cdf54a8c7
Fix column affinity detection
...
As it turns out, column affinity is tricky in SQLite...
https://www.sqlite.org/datatype3.html#determination_of_column_affinity
2023-09-04 21:19:12 +03:00
Pekka Enberg
ccee8c3336
Parse schema from database file
...
Fixes #1
2023-09-02 19:19:23 +03:00
Pekka Enberg
6f1d03d64d
Look up columns from table schema
2023-08-27 21:18:17 +03:00
Pekka Enberg
3b53f48400
Look up table root page from schema
2023-08-27 21:11:49 +03:00
Pekka Enberg
2615cdce2c
Schema in-memory data structures
2023-08-27 20:40:35 +03:00