Commit Graph

78 Commits

Author SHA1 Message Date
Pekka Enberg
e5d55398db Merge pull request #104 from KunalSin9h/dot-commands 2024-07-08 20:51:50 +03:00
Kunal Singh
46cd1f067b fix: missing dot command description in unknown command message 2024-07-08 23:19:21 +05:30
Kunal Singh
00c26286ce fix: lint warnings 2024-07-08 22:43:11 +05:30
Pere Diaz Bou
0b7226087b cli: added .opcodes helper
Improve quality of life while implementing core features.

```
Welcome to Limbo SQL shell!
> .opcodes
Abortable
---------
Verify that an Abort can happen. Assert if an Abort at this point might cause database corruption. This opcode only appears in debugging builds. An Abort is safe if either there have been no writes, or if there is an active statement journal.

Add
---------
Add the value in register P1 to the value in register P2 and store the result in register P3. If either input is NULL, the result is NULL.

AddImm
---------
Add the constant P2 to the value in register P1. The result is always an integer. To force any register to be an integer, just add 0.

Affinity
---------
Apply affinities to a range of P2 registers starting with P1. P4 is a string that is P2 characters long. The N-th character of the string indicates the column affinity that should be used for the N-th memory cell in the range.

AggFinal
---------
P1 is the memory location that is the accumulator for an aggregate or window function. Execute the finalizer function for an aggregate and store the result in P1. P2 is the number of arguments that the step function takes and P4 is a pointer to the FuncDef for this function. The P2 argument is not used by this opcode. It is only there to disambiguate functions that can take varying numbers of arguments. The P4 argument is only needed for the case where the step function was not previously called.
```

It can also search for specific opcode:
```
> .opcodes yield
Yield
---------
Swap the program counter with the value in register P1. This has the effect of yielding to a coroutine. If the coroutine that is launched by this instruction ends with Yield or Return then continue to the next instruction. But if the coroutine launched by this instruction ends with EndCoroutine, then jump to P2 rather than continuing with the next instruction. See also: InitCoroutine
```
2024-07-06 14:21:29 +02:00
Karan Janthe
c4e85cb8da .schema without args shows all table indexs 2024-07-06 11:09:29 +05:30
Karan Janthe
8e1c737236 added .schema command in cli 2024-07-06 10:50:26 +05:30
Pekka Enberg
70b73e7535 Fix limbo output to match sqlite3
Fix the output of the `limbo` program to match `sqlite3` to simplify
testing.
2024-06-19 16:06:20 +03:00
Pekka Enberg
ed9f3e6d1e Single-threaded architecture
Use Rc instead of Arc and replace the concurrent LRU with
single-threaded SIEVE.

Fixes #23
Fixes #29
2024-03-03 12:44:45 +02:00
Pekka Enberg
225ee98769 cargo fmt 2024-01-28 09:58:04 +02:00
Pekka Enberg
0b9b6cfd29 Asynchronous I/O 2024-01-24 08:14:53 +02:00
Pekka Enberg
725eed964b Tracing improvements 2024-01-14 15:36:59 +02:00
Pekka Enberg
44dcd48071 Fix WebAssembly build 2024-01-14 15:29:27 +02:00
Pekka Enberg
ae2f403838 core: Fix step() return path when page is under I/O 2024-01-12 17:35:55 +02:00
Pekka Enberg
2724b0f411 Simplify Buffer and Completion
Eliminate the explicit lifetime parameter from Buffer to simplify the code.
2024-01-05 16:32:21 +02:00
Pekka Enberg
e17eea96ab Add support for executing SQL directly without REPL 2023-10-06 20:03:02 +03:00
Pekka Enberg
9098744a37 Rename to Limbo 2023-09-30 15:40:35 +03:00
Pekka Enberg
1e1e096a48 Refactor I/O and storage layers 2023-09-16 09:34:17 +03:00
Pekka Enberg
fe41f46bc0 I/O trait 2023-09-10 21:57:36 +03:00
Pekka Enberg
72e92820d6 Share I/O ring across multiple files 2023-09-10 20:57:54 +03:00
Pekka Enberg
bc9c53ec52 Switch to raw output mode by default 2023-09-10 12:44:33 +03:00
Pekka Enberg
4a5c71ab7a I/O interface refactoring 2023-09-09 10:22:26 +03:00
Pekka Enberg
49c19b55ab Unify sync I/O 2023-09-08 20:27:32 +03:00
Pekka Enberg
890d71b17f Add support for raw output mode 2023-09-08 09:16:59 +03:00
Pekka Enberg
3ec9c0be7c Implement ResultRow opcode 2023-09-02 11:40:11 +03:00
Pekka Enberg
f954729fd9 Tune prompt some more 2023-09-01 21:02:52 +03:00
Pekka Enberg
ab96f27c56 Change prompt 2023-09-01 19:50:29 +03:00
Pekka Enberg
591e8df377 Disable tracing by default 2023-09-01 19:49:54 +03:00
Pekka Enberg
fb72f9688b Initial commit 2023-08-27 09:59:12 +03:00