Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused tcl proc #341

Closed
wants to merge 870 commits into from
Closed

Conversation

seonWKim
Copy link
Contributor

Cleanup(unused tcl procs which I've wrote before)

penberg and others added 30 commits August 2, 2024 16:04
...it's not used for anything much.
Move the function so that it's callers are above the function definition
for smoother flow when reading the code.
Follow the same naming convention as other SQL functions.
Follow the same naming convention as other SQL functions.
The file contains SQL functions invoked by the VDBE so let's move the
file there.
… from ashley williams

saw you were building a windows bin but not a ps installer and thought i would turn it off. also turned on github attestations because why not.

`cargo dist plan` is basically the same as before but now also produces the PS installer.
```
announcing v0.0.3
  limbo 0.0.3
    source.tar.gz
      [checksum] source.tar.gz.sha256
    limbo-installer.sh
    limbo-installer.ps1
    limbo-aarch64-apple-darwin-update
    limbo-aarch64-apple-darwin.tar.xz
      [bin] limbo
      [misc] CHANGELOG.md, LICENSE.md, README.md
      [checksum] limbo-aarch64-apple-darwin.tar.xz.sha256
    limbo-x86_64-apple-darwin-update
    limbo-x86_64-apple-darwin.tar.xz
      [bin] limbo
      [misc] CHANGELOG.md, LICENSE.md, README.md
      [checksum] limbo-x86_64-apple-darwin.tar.xz.sha256
    limbo-x86_64-pc-windows-msvc-update
    limbo-x86_64-pc-windows-msvc.zip
      [bin] limbo.exe
      [misc] CHANGELOG.md, LICENSE.md, README.md
      [checksum] limbo-x86_64-pc-windows-msvc.zip.sha256
    limbo-x86_64-unknown-linux-gnu-update
    limbo-x86_64-unknown-linux-gnu.tar.xz
      [bin] limbo
      [misc] CHANGELOG.md, LICENSE.md, README.md
      [checksum] limbo-x86_64-unknown-linux-gnu.tar.xz.sha256
  ```

Closes penberg#263
Replace `>` with `>=` to match the SQLite documentation. Serial type
value `12` is for 0-size BLOB, and `13` is for 0-size TEXT.
Replace `>` with `>=` to match the [SQLite documentation](https://www.sqlite.org/fileformat.html#record_format).

Serial type value `12` is for 0-size BLOB, and `13` is for 0-size TEXT.

Closes penberg#264
The PageSource wrapper is useless. Let's inline it and use PageIO
directly.
Let's call them read_page() and write_page().
We're going to need it for WebAssembly anyway, which does not have
standard filesystem support.
Turn the WAL into a trait and open + parse WAL header.

Closes penberg#267
Let's switch the SQLite benchmarks to use similar file locking protocol
as we do. Improves SQLite's performance by 2x, but Limbo is still
faster.

Before:

rusqlite/Prepare statement: 'SELECT * FROM users LIMIT 1'
                        time:   [2.1027 µs 2.1239 µs 2.1563 µs]
                        thrpt:  [463.75 Kelem/s 470.83 Kelem/s 475.57 Kelem/s]

After:

rusqlite/Execute prepared statement: 'SELECT * FROM users LIMIT 1'
                        time:   [940.07 ns 944.16 ns 949.39 ns]
                        thrpt:  [1.0533 Melem/s 1.0591 Melem/s 1.0638 Melem/s]
Fix penberg#260 by ensuring `Ctrl-C` interrupts the query without terminating
the process. Implement the SQLite strategy where pressing `Ctrl-C` twice
exits the shell.

Closes penberg#269
Makes debugging a little bit easier...
seonWKim and others added 27 commits September 16, 2024 23:07
Per the sqlite docs, LIKE is case-insensitive.
> The LIKE operator does a pattern matching comparison. The operand to
the right of the LIKE operator contains the pattern and the left hand
operand contains the string to match against the pattern. A percent
symbol ("%") in the LIKE pattern matches any sequence of zero or more
characters in the string. An underscore ("_") in the LIKE pattern
matches any single character in the string. **Any other character
matches itself or its lower/upper case equivalent (i.e. case-insensitive
matching)**. Important Note: SQLite only understands upper/lower case
for ASCII characters by default. The LIKE operator is case sensitive by
default for unicode characters that are beyond the ASCII range. For
example, the expression 'a' LIKE 'A' is TRUE but 'æ' LIKE 'Æ' is FALSE.
The ICU extension to SQLite includes an enhanced version of the LIKE
operator that does case folding across all unicode characters.
Note that sqlite does not support case-insensitive comparisons of
unicode characters by default. This PR _does not_ match that behavior
currently. I can change things to not support unicode-case-
insensitivity, but as I understand it, doing so may require disable the
unicode-case feature on the regex crate, and potentially using a
`regex::bytes::Regex`, instead of a `regex::Regex`. (Basically, doing
some stuff that would not match anyone's initial assumptions about how
this would work).

Closes penberg#333
…' from RJ Barman

Related to penberg#144
- Separates `glob` and `like` regex caches, since the same pattern would
result in a different regex depending on which rules you apply
- Also fixes the value of `constant_mask` when translating LIKE
expressions now that non-constant pattern values are supported.
Note that LIKE and GLOB are almost entirely the same, the only
difference being the matching rules (so in our case, the regex
construction).

Closes penberg#334
### Changes
- Remove clippy warning messages
- Add `#[allow(clippy...)]` in places where it might be better not to
fix
### TODO
recommended changes by `cargo fmt` on my local and github differs on
`sqlite3/src/lib.rs`. Should check for the reason
=> just upgrade the rust toolchain

Closes penberg#329
…on Woo

### sqlite
<img width="792" alt="image" src="https://github.com/user-
attachments/assets/1a9238db-d948-4583-a808-f9adfec7c534">
### limbo
<img width="809" alt="image" src="https://github.com/user-
attachments/assets/ea3e5f7e-bb3e-450d-be34-59ca00128beb">
### Changes
- Add support for `sqlite_version()` function
- Update function's explain message depending on the number of arguments

Closes penberg#335
```bash
limbo> insert into products values (1, 'asdf', 432);
Runtime error: UNIQUE constraint failed: products.id (19)
```

Closes penberg#336
Bump operations per run but more importantly turn "ascending" option so
that we process pull requests with smaller IDs first that are more
likely to be stale.
Bump operations per run but more importantly turn "ascending" option so
that we process pull requests with smaller IDs first that are more
likely to be stale.

Closes penberg#337
### Motivation
Add support for WHERE parenthesized conditions
- closes penberg#153

Closes penberg#338
See SQLite documentation:
https://www.sqlite.org/lang_corefunc.html#typeof
Relates to issue penberg#144 Scalar function support

Reviewed-by: Jussi Saurio <[email protected]>

Closes penberg#310
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.