@lunora/sql-store 1.0.0-alpha.1 → 1.0.0-alpha.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -103,3 +103,9 @@ Unless required by applicable law or agreed to in writing, software distributed
103
103
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
104
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
105
  specific language governing permissions and limitations under the License.
106
+
107
+ <!-- DEPENDENCIES -->
108
+ <!-- /DEPENDENCIES -->
109
+
110
+ <!-- TYPE_DEPENDENCIES -->
111
+ <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -1,4 +1,38 @@
1
- # @lunora/sql-store
1
+ <!-- START_PACKAGE_OG_IMAGE_PLACEHOLDER -->
2
+
3
+ <a href="https://www.anolilab.com/open-source" align="center">
4
+
5
+ <img src="__assets__/package-og.svg" alt="sql-store" />
6
+
7
+ </a>
8
+
9
+ <h3 align="center">Internal dialect-parameterized SQL store core for Lunora .global() backends (D1, PlanetScale)</h3>
10
+
11
+ <!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
12
+
13
+ <br />
14
+
15
+ <div align="center">
16
+
17
+ [![typescript-image][typescript-badge]][typescript-url]
18
+ [![FSL-1.1-Apache-2.0 licence][license-badge]][license]
19
+ [![npm version][npm-version-badge]][npm-version]
20
+ [![npm downloads][npm-downloads-badge]][npm-downloads]
21
+ [![PRs Welcome][prs-welcome-badge]][prs-welcome]
22
+
23
+ </div>
24
+
25
+ ---
26
+
27
+ <div align="center">
28
+ <p>
29
+ <sup>
30
+ Daniel Bannert's open source work is supported by the community on <a href="https://github.com/sponsors/prisis">GitHub Sponsors</a>
31
+ </sup>
32
+ </p>
33
+ </div>
34
+
35
+ ---
2
36
 
3
37
  **Internal.** The dialect-parameterized SQL store core shared by Lunora's
4
38
  `.global()` table backends. One ORM implementation (`createSqlCtxDb`) drives any
@@ -11,6 +45,8 @@ SQL engine:
11
45
  You do not depend on this package directly. Depend on `@lunora/d1` or
12
46
  `@lunora/hyperdrive`, which supply the concrete dialect and wrap the core.
13
47
 
48
+ Part of the [Lunora](https://github.com/anolilab/lunora) framework — a type-safe, real-time backend on Cloudflare Workers + Durable Objects with a Vite-first DX.
49
+
14
50
  ## How it works
15
51
 
16
52
  The core builds every statement as a composable **drizzle `SQL`** and renders it
@@ -47,7 +83,8 @@ seam from the root); consumers import everything from the root `@lunora/sql-stor
47
83
  - Migration runners (each takes `(exec, schema, dialect)`, or `(exec, dialect)`
48
84
  for CDC): `runSqlGlobalTableMigrations`, `runSqlAggregateMigrations`,
49
85
  `runSqlRankMigrations`, `runSqlSearchMigrations`, `runSqlCdcMigration`.
50
- - CDC log helpers: `readSqlCdcChanges`, `trimSqlCdcChanges`.
86
+ - CDC log helpers: `readSqlCdcChanges`, `readSqlCdcChangedTables`,
87
+ `readSqlCdcFloor`, `sweepSqlCdcRetention`.
51
88
  - Value codec building blocks a dialect reuses for `encode`/`decode`:
52
89
  `sqliteEncode`, `sqliteDecode`, `decodeBigint`, `tryJsonParse`,
53
90
  `effectiveColumnKind`.
@@ -57,3 +94,46 @@ seam from the root); consumers import everything from the root `@lunora/sql-stor
57
94
  Writing a new engine adapter means supplying a `SqlDialect` value (see
58
95
  [`@lunora/d1`](../d1)'s `sqliteDialect` for the reference) and an `exec` that
59
96
  satisfies `SqlExec`/`SqlCtxExec`, then calling `createSqlCtxDb`.
97
+
98
+ ## Related
99
+
100
+ - [`@lunora/d1`](https://www.npmjs.com/package/@lunora/d1) — SQLite/D1 dialect and `exec` wrapping this core.
101
+ - [`@lunora/hyperdrive`](https://www.npmjs.com/package/@lunora/hyperdrive) — Postgres/MySQL dialect over Cloudflare Hyperdrive.
102
+ - [`@lunora/do`](https://www.npmjs.com/package/@lunora/do) — the shard store whose `broadcast` hook drives live queries.
103
+
104
+ ## Supported Node.js Versions
105
+
106
+ Libraries in this ecosystem make the best effort to track [Node.js' release schedule](https://github.com/nodejs/release#release-schedule).
107
+ Here's [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
108
+
109
+ ## Contributing
110
+
111
+ If you would like to help take a look at the [list of issues](https://github.com/anolilab/lunora/issues) and check our [Contributing](https://github.com/anolilab/lunora/blob/alpha/.github/CONTRIBUTING.md) guidelines.
112
+
113
+ > **Note:** please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
114
+
115
+ ## Credits
116
+
117
+ - [Daniel Bannert](https://github.com/prisis)
118
+ - [All Contributors](https://github.com/anolilab/lunora/graphs/contributors)
119
+
120
+ ## Made with ❤️ at Anolilab
121
+
122
+ This is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Anolilab](https://www.anolilab.com/open-source) is a Development and AI Studio. Contact us at [hello@anolilab.com](mailto:hello@anolilab.com) if you need any help with these technologies or just want to say hi!
123
+
124
+ ## License
125
+
126
+ The Lunora sql-store package is open-sourced software licensed under the [FSL-1.1-Apache-2.0][license].
127
+
128
+ <!-- badges -->
129
+
130
+ [license-badge]: https://img.shields.io/badge/license-FSL--1.1--Apache--2.0-blue.svg?style=for-the-badge
131
+ [license]: https://github.com/anolilab/lunora/blob/alpha/LICENSE.md
132
+ [npm-version-badge]: https://img.shields.io/npm/v/@lunora/sql-store?style=for-the-badge
133
+ [npm-version]: https://www.npmjs.com/package/@lunora/sql-store
134
+ [npm-downloads-badge]: https://img.shields.io/npm/dm/@lunora/sql-store?style=for-the-badge
135
+ [npm-downloads]: https://www.npmjs.com/package/@lunora/sql-store
136
+ [prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
137
+ [prs-welcome]: https://github.com/anolilab/lunora/blob/alpha/.github/CONTRIBUTING.md
138
+ [typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
139
+ [typescript-url]: https://www.typescriptlang.org/