Tobie Morgan Hitchcock
3f568f3990
Simplify session conversion to database context
2022-05-31 19:00:32 +01:00
Tobie Morgan Hitchcock
01d21e1157
Implement INSERT and RELATE statements
2022-05-30 16:32:26 +01:00
Tobie Morgan Hitchcock
44df5a8621
Allow modification of documents from subquery result sets
2022-05-25 10:39:36 +01:00
Tobie Morgan Hitchcock
52e8954ae4
Ensure library works in multi-threaded and single-threaded environments
2022-05-16 00:04:11 +01:00
Tobie Morgan Hitchcock
75de89d9a1
Add support for both writeable and read-only transactions
2022-05-14 22:30:49 +01:00
Tobie Morgan Hitchcock
1017e2fffb
Don’t clone variables when processing sub-contexts
...
Closes SUR-53
When creating a new context for subqueries or statement clauses, we used to have to clone any variables/values, and freeze the context, so that it could be used across threads and async boundaries.
Now with the new executor pattern for parallel queries, we can pass references instead, improving performance by removing unnecessary cloning of values.
2022-05-14 13:38:17 +01:00
Tobie Morgan Hitchcock
6ff2a78c88
Don’t use static futures for parallel query execution
...
Instead of using static futures when processing a query in parallel, we now use a new executor model, which allows us to process futures which make use of references. As a result, we can remove the need to store each statement in an Arc.
2022-05-13 21:57:40 +01:00
Tobie Morgan Hitchcock
cc40e26e3f
Add additional functions on Auth type for validating authentication
2022-05-11 15:23:07 +01:00
Tobie Morgan Hitchcock
1e2ba72e37
Reduce mem size of Error enum types
2022-05-06 23:09:08 +01:00
Tobie Morgan Hitchcock
4d072a7f6c
Reduce mem size of SQL Model by converting to an enum
2022-05-06 17:02:44 +01:00
Tobie Morgan Hitchcock
0125cb28b0
Implement Deref on SQL Order type
2022-05-05 12:27:08 +01:00
Tobie Morgan Hitchcock
ed92fb4d85
Implement SQL Ident as a newtype tuple struct
2022-05-05 10:24:52 +01:00
Tobie Morgan Hitchcock
3233660037
Implement SQL Table as a newtype tuple struct
2022-05-05 10:24:46 +01:00
Tobie Morgan Hitchcock
bd6f01971f
Implement SQL Query as a newtype tuple struct
2022-05-05 10:19:19 +01:00
Tobie Morgan Hitchcock
643592d750
Implement SQL Split as a newtype tuple struct
2022-05-05 10:19:19 +01:00
Tobie Morgan Hitchcock
b6cc3ca1ff
Implement SQL Fetch as a newtype tuple struct
2022-05-05 10:19:19 +01:00
Tobie Morgan Hitchcock
745fa4fd97
Implement SQL Group as a newtype tuple struct
2022-05-05 10:19:05 +01:00
Tobie Morgan Hitchcock
ec6cfc4fef
Ensure TIMEOUT clauses are processed correctly
2022-05-04 23:37:57 +01:00
Tobie Morgan Hitchcock
143da56728
Implement SQL Array as a newtype tuple struct
2022-05-04 23:37:57 +01:00
Tobie Morgan Hitchcock
c5960a028e
Improve comments in public library package
2022-05-04 00:49:38 +01:00
Tobie Morgan Hitchcock
ffc3ed82f7
Simplify external API when working with Datastore
2022-05-04 00:07:46 +01:00
Tobie Morgan Hitchcock
6a8c53b51e
Don’t use custom type definition for query responses
2022-05-03 17:47:47 +01:00
Tobie Morgan Hitchcock
0cbcb3b374
Simplify database query response object
2022-05-02 00:35:01 +01:00
Tobie Morgan Hitchcock
a4e07f693b
Make certain functions private to crate
2022-05-01 23:25:53 +01:00
Tobie Morgan Hitchcock
1697beda9c
No need to store the actual error on the executor
2022-05-01 10:35:26 +01:00
Tobie Morgan Hitchcock
355f1aac7b
Don’t override context unnecessarily
2022-04-29 21:43:44 +01:00
Tobie Morgan Hitchcock
fb27185435
Remove unused import
2022-04-29 21:40:02 +01:00
Tobie Morgan Hitchcock
4c8d9dbb63
implement COLLATE and NUMERIC ordering in ORDER BY clauses
2022-04-27 16:21:51 +01:00
Tobie Morgan Hitchcock
4bc3b299aa
Implement RAND() ordering in ORDER BY clauses
2022-04-27 02:30:26 +01:00
Tobie Morgan Hitchcock
5df1040dd8
Implement PERMISSIONS clauses
2022-04-06 00:09:23 +01:00
Tobie Morgan Hitchcock
200741a35e
Simplify &self in function definitions
2022-04-06 00:09:23 +01:00
Tobie Morgan Hitchcock
aab4d0b096
Implement FIELD TYPE / VALUE / ASSERT clauses
2022-04-06 00:09:23 +01:00
Tobie Morgan Hitchcock
94ffc054a7
Fix clippy warnings
2022-04-01 23:28:54 +01:00
Tobie Morgan Hitchcock
c45d383b77
Change name of OPTION statement options
2022-04-01 12:23:49 +01:00
Tobie Morgan Hitchcock
c6c43aea8a
Ensure OPTION IMPORT statement has opposite effect
2022-04-01 12:23:49 +01:00
Tobie Morgan Hitchcock
4dea5c72ee
Improve common function execution speed by inlining
2022-04-01 12:23:49 +01:00
Tobie Morgan Hitchcock
41c44ea709
Add runtime option for disabling permission checks
2022-04-01 12:23:49 +01:00
Tobie Morgan Hitchcock
1ea692d32e
Make code more consistent and simpler to read
2022-04-01 12:23:49 +01:00
Tobie Morgan Hitchcock
a938f017c4
Only allow OPTION statements to be run with KV/NS/DB auth levels
2022-04-01 09:20:44 +01:00
Tobie Morgan Hitchcock
7e2eae32c5
Ensure query auth level checks are logically correct
2022-04-01 00:36:23 +01:00
Tobie Morgan Hitchcock
9f7527c01a
Make simple value fetching functions synchronous
2022-03-25 21:15:55 +00:00
Tobie Morgan Hitchcock
87840e3e05
Implement GROUP BY clauses
2022-03-25 18:43:36 +00:00
Tobie Morgan Hitchcock
6017d424eb
Implement FETCH clauses
2022-03-23 14:02:41 +00:00
Tobie Morgan Hitchcock
f674ea0544
Implement ORDER BY clauses
2022-03-23 14:02:41 +00:00
Tobie Morgan Hitchcock
3370b20c38
Only allow simple fields for SPLIT, ORDER, and GROUP clauses
2022-03-23 14:02:03 +00:00
Tobie Morgan Hitchcock
652195032c
Implement SPLIT ON clauses
2022-03-23 14:02:02 +00:00
Tobie Morgan Hitchcock
0b3f4c5765
Prevent usize overflow when no records found
2022-03-23 12:05:50 +00:00
Tobie Morgan Hitchcock
f8b747374f
Pass the current statement to the value iterator functions
2022-03-18 19:51:13 +00:00
Tobie Morgan Hitchcock
5b1d727c25
Enable fetching WHERE clause from statement in iterator
2022-03-18 19:50:47 +00:00
Tobie Morgan Hitchcock
24752a75d9
Enable support for numbers and strings in record ids
2022-03-18 07:24:36 +00:00
Tobie Morgan Hitchcock
364412b437
Improve datastore key creation functionality
2022-03-18 07:21:22 +00:00
Tobie Morgan Hitchcock
f509b88109
Ensure upper range is included in a |test:1..10| model
2022-03-17 22:26:34 +00:00
Tobie Morgan Hitchcock
60c05ee082
Use hexadecimal u8 values when altering datastore keys
2022-03-16 17:01:25 +00:00
Tobie Morgan Hitchcock
64c02896dd
Implement record storing and fetching
2022-03-07 18:11:44 +00:00
Tobie Morgan Hitchcock
77844ab06b
Convert error names according to clippy recommendations
2022-03-06 22:21:37 +00:00
Tobie Morgan Hitchcock
d1c2daaee4
Apply cargo clippy lint recommendations
2022-03-05 14:42:58 +00:00
Tobie Morgan Hitchcock
38c7ae206e
Enable parallel iteration of records
2022-02-27 00:01:19 +00:00
Tobie Morgan Hitchcock
ec698e85de
Add keyword to queries for PARALLEL execution
2022-02-26 16:53:38 +00:00
Tobie Morgan Hitchcock
b12a76c2ae
Return &str instead of &String values
2022-02-26 00:35:11 +00:00
Tobie Morgan Hitchcock
10c0b5c732
Check the context before processing values
2022-02-25 22:42:14 +00:00
Tobie Morgan Hitchcock
1eddf94e8d
Improve code and logic in iterator
2022-02-23 13:56:54 +00:00
Tobie Morgan Hitchcock
73879706a6
Improve debug and trace logging
2022-02-23 13:29:29 +00:00
Tobie Morgan Hitchcock
d5c53b7791
Extract core surrealdb code into separate library
2022-02-22 14:16:50 +00:00