Skip to content

Commit

Permalink
Update verbiage of various documentation
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Wise <[email protected]>
  • Loading branch information
m4heshd and JoshuaWise committed Jan 29, 2025
1 parent f99b832 commit 853da35
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 53 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Downloads](https://img.shields.io/npm/dt/better-sqlite3-multiple-ciphers?logo=DocuSign&logoColor=FFF&color=2757c4&style=for-the-badge)](https://www.npmjs.com/package/better-sqlite3-multiple-ciphers)
[![Build status](https://img.shields.io/github/actions/workflow/status/m4heshd/better-sqlite3-multiple-ciphers/test.yml?branch=master&label=Build%2FTest&logo=github&style=for-the-badge)](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/actions/workflows/test.yml)

The fastest and simplest library for SQLite3 in Node.js. This particular fork supports multiple-cipher encryption using [SQLite3MultipleCiphers](https://github.com/utelle/SQLite3MultipleCiphers). Check [usage](#usage) to learn more.
The fastest and simplest library for SQLite in Node.js. This particular fork supports multiple-cipher encryption using [SQLite3MultipleCiphers](https://github.com/utelle/SQLite3MultipleCiphers). Check [usage](#usage) to learn more.

- Full transaction support
- High performance, efficiency, and safety
Expand Down Expand Up @@ -158,7 +158,7 @@ uses [SQLite3MultipleCiphers](https://github.com/utelle/SQLite3MultipleCiphers)

#### When is this library not appropriate?

In most cases, if you're attempting something that cannot be reasonably accomplished with `better-sqlite3`, it probably cannot be reasonably accomplished with SQLite3 in general. For example, if you're executing queries that take one second to complete, and you expect to have many concurrent users executing those queries, no amount of asynchronicity will save you from SQLite3's serialized nature. Fortunately, SQLite3 is very *very* fast. With proper indexing, we've been able to achieve upward of 2000 queries per second with 5-way-joins in a 60 GB database, where each query was handling 5–50 kilobytes of real data.
In most cases, if you're attempting something that cannot be reasonably accomplished with `better-sqlite3`, it probably cannot be reasonably accomplished with SQLite in general. For example, if you're executing queries that take one second to complete, and you expect to have many concurrent users executing those queries, no amount of asynchronicity will save you from SQLite's serialized nature. Fortunately, SQLite is very *very* fast. With proper indexing, we've been able to achieve upward of 2000 queries per second with 5-way-joins in a 60 GB database, where each query was handling 5–50 kilobytes of real data.

If you have a performance problem, the most likely causes are inefficient queries, improper indexing, or a lack of [WAL mode](./docs/performance.md)—not `better-sqlite3` itself. However, there are some cases where `better-sqlite3` could be inappropriate:

Expand All @@ -170,10 +170,10 @@ For these situations, you should probably use a full-fledged RDBMS such as [Post

## Upgrading

Upgrading your `better-sqlite3-multiple-ciphers` dependency can potentially introduce breaking changes, either in the `better-sqlite3-multiple-ciphers` API, or between your existing database(s) and the underlying version of SQLite. Before upgrading, review:
Upgrading your `better-sqlite3-multiple-ciphers` dependency can potentially introduce breaking changes, either in the `better-sqlite3-multiple-ciphers` API (if you upgrade to a new [major version](https://semver.org/)), or between your existing database(s) and the underlying version of SQLite. Before upgrading, review:

* `better-sqlite3-multiple-ciphers` release notes: https://github.com/WiseLibs/better-sqlite3-multiple-ciphers/releases
* SQLite changelog: https://www.sqlite.org/changes.html
* [`better-sqlite3-multiple-ciphers` release notes](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases)
* [SQLite release history](https://www.sqlite.org/changes.html)

# Documentation

Expand All @@ -182,7 +182,7 @@ Upgrading your `better-sqlite3-multiple-ciphers` dependency can potentially intr
- [64-bit integer support](./docs/integer.md)
- [Worker thread support](./docs/threads.md)
- [Unsafe mode (advanced)](./docs/unsafe.md)
- [SQLite3 compilation](./docs/compilation.md)
- [SQLite compilation (advanced)](./docs/compilation.md)

# License

Expand Down
2 changes: 1 addition & 1 deletion benchmark/drivers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/*
Every benchmark trial will be executed once for each SQLite3 driver listed
Every benchmark trial will be executed once for each SQLite driver listed
below. Each driver has a function to open a new database connection on a
given filename and a list of PRAGMA statements.
*/
Expand Down
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===
# This is the main GYP file, which builds better-sqlite3 with SQLite3 itself.
# This is the main GYP file, which builds better-sqlite3 with SQLite itself.
# ===

{
Expand Down
2 changes: 1 addition & 1 deletion deps/sqlite3.gyp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===
# This configuration defines options specific to compiling SQLite3 itself.
# This configuration defines options specific to compiling SQLite itself.
# Compile-time options are loaded by the auto-generated file "defines.gypi".
# The --sqlite3 option can be provided to use a custom amalgamation instead.
# ===
Expand Down
2 changes: 1 addition & 1 deletion deps/test_extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SQLITE_EXTENSION_INIT1

/*
This SQLite3 extension is used only for testing purposes (npm test).
This SQLite extension is used only for testing purposes (npm test).
*/

static void TestExtensionFunction(sqlite3_context* pCtx, int nVal, sqlite3_value** _) {
Expand Down
20 changes: 10 additions & 10 deletions deps/update-sqlite3mc.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash

# ===
# This script defines and generates the bundled SQLite3 unit (sqlite3.c).
# This script defines and generates the bundled SQLite unit (sqlite3.c).
#
# The following steps are taken:
# 1. populate the shell environment with the defined compile-time options.
# 2. download and extract the SQLite3 source code into a temporary directory.
# 2. download and extract the SQLite source code into a temporary directory.
# 3. run "sh configure" and "make sqlite3.c" within the source directory.
# 4. clone the SQLite3MultipleCiphers repo, replace SQLite3 amalgamation and patch it.
# 4. clone the SQLite3MultipleCiphers repo, replace SQLite amalgamation and patch it.
# 5. build the SQLite3MultipleCiphers amalgamation
# 6. copy the generated amalgamation into the output directory (./sqlite3).
# 7. export the defined compile-time options to a gyp file (./defines.gypi).
Expand Down Expand Up @@ -76,17 +76,17 @@ mkdir -p "$TEMP"
mkdir -p "$OUTPUT"
export CFLAGS=`echo $(echo "$DEFINES" | sed -e "/^\s*$/d" -e "s/^/-D/")`

echo -e "\nDownloading SQLite3 source..."
echo -e "\nDownloading SQLite source..."
curl -#f "https://www.sqlite.org/$YEAR/sqlite-src-$VERSION.zip" > "$TEMP/source.zip" || exit 1

echo -e "\nExtracting SQLite3 source..."
echo -e "\nExtracting SQLite source..."
unzip "$TEMP/source.zip" -d "$TEMP" > /dev/null || exit 1
cd "$TEMP/sqlite-src-$VERSION" || exit 1

echo -e "\nConfiguring SQLite3 amalgamation..."
echo -e "\nConfiguring SQLite amalgamation..."
sh configure > /dev/null || exit 1

echo -e "\nBuilding SQLite3 amalgamation..."
echo -e "\nBuilding SQLite amalgamation..."
make OPTIONS="$CFLAGS" sqlite3.c > /dev/null || exit 1

echo -e "\nCloning SQLite3MultipleCiphers repo..."
Expand All @@ -95,11 +95,11 @@ git clone --quiet https://github.com/utelle/SQLite3MultipleCiphers.git > /dev/nu
cd "$TEMP/SQLite3MultipleCiphers" || exit 1
git checkout --quiet "tags/$SQLITE3MC_VERSION" > /dev/null || exit 1

echo -e "\nReplacing SQLite3 amalgamation in SQLite3MultipleCiphers..."
echo -e "\nReplacing SQLite amalgamation in SQLite3MultipleCiphers..."
cd "$TEMP/sqlite-src-$VERSION" || exit 1
(yes | cp -rf sqlite3.c sqlite3.h sqlite3ext.h "$TEMP/SQLite3MultipleCiphers/src") || exit 1

echo -e "\nPatching SQLite3 amalgamation in SQLite3MultipleCiphers..."
echo -e "\nPatching SQLite amalgamation in SQLite3MultipleCiphers..."
cd "$TEMP/SQLite3MultipleCiphers" || exit 1
chmod +x ./scripts/patchsqlite3.sh || exit 1
chmod +x ./scripts/rekeyvacuum.sh || exit 1
Expand Down Expand Up @@ -137,4 +137,4 @@ echo -e "\nCleaning up..."
cd - > /dev/null || exit 1
rm -rf "$TEMP"

echo -e "\nSQLite3MC update process completed!"
echo -e "\nSQLite3MultipleCiphers update process completed!"
Loading

0 comments on commit 853da35

Please sign in to comment.