@rc312/effect-snowflake 0.1.0 → 0.2.0
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/CHANGELOG.md +8 -0
- package/LICENSE +0 -0
- package/README.md +2 -4
- package/dist/adbc-driver.d.ts +0 -0
- package/dist/adbc-driver.d.ts.map +0 -0
- package/dist/adbc-driver.js +0 -0
- package/dist/adbc-driver.js.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +0 -0
- package/dist/index.js +0 -0
- package/dist/index.js.map +0 -0
- package/dist/internal/client.d.ts +0 -0
- package/dist/internal/client.d.ts.map +0 -0
- package/dist/internal/client.js +0 -0
- package/dist/internal/client.js.map +0 -0
- package/dist/internal/configuration.d.ts +0 -0
- package/dist/internal/configuration.d.ts.map +0 -0
- package/dist/internal/configuration.js +0 -0
- package/dist/internal/configuration.js.map +0 -0
- package/dist/internal/connection.d.ts +0 -0
- package/dist/internal/connection.d.ts.map +0 -0
- package/dist/internal/connection.js +0 -0
- package/dist/internal/connection.js.map +0 -0
- package/dist/internal/lifecycle.d.ts +0 -0
- package/dist/internal/lifecycle.d.ts.map +0 -0
- package/dist/internal/lifecycle.js +0 -0
- package/dist/internal/lifecycle.js.map +0 -0
- package/dist/internal/native.d.ts +0 -0
- package/dist/internal/native.d.ts.map +0 -0
- package/dist/internal/native.js +0 -0
- package/dist/internal/native.js.map +0 -0
- package/dist/internal/session.d.ts +0 -0
- package/dist/internal/session.d.ts.map +0 -0
- package/dist/internal/session.js +0 -0
- package/dist/internal/session.js.map +0 -0
- package/dist/internal/transaction.d.ts +0 -0
- package/dist/internal/transaction.d.ts.map +0 -0
- package/dist/internal/transaction.js +0 -0
- package/dist/internal/transaction.js.map +0 -0
- package/dist/models.d.ts +0 -0
- package/dist/models.d.ts.map +0 -0
- package/dist/models.js +0 -0
- package/dist/models.js.map +0 -0
- package/dist/snowflake-error.d.ts +0 -0
- package/dist/snowflake-error.d.ts.map +0 -0
- package/dist/snowflake-error.js +0 -0
- package/dist/snowflake-error.js.map +0 -0
- package/examples/.env.example +0 -0
- package/examples/README.md +1 -1
- package/examples/check.ts +0 -0
- package/examples/composition.ts +0 -0
- package/examples/options.ts +0 -0
- package/examples/query.ts +0 -0
- package/examples/run.ts +0 -0
- package/examples/scenarios.ts +0 -0
- package/examples/stream.ts +0 -0
- package/examples/transaction.ts +0 -0
- package/package.json +4 -4
- package/src/adbc-driver.ts +0 -0
- package/src/index.ts +0 -0
- package/src/internal/client.ts +0 -0
- package/src/internal/configuration.ts +0 -0
- package/src/internal/connection.ts +0 -0
- package/src/internal/lifecycle.ts +0 -0
- package/src/internal/native.ts +0 -0
- package/src/internal/session.ts +0 -0
- package/src/internal/transaction.ts +0 -0
- package/src/models.ts +0 -0
- package/src/snowflake-error.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @rc312/effect-snowflake
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Upgrade Effect support to 4.1.2 and require Node.js 22.19 or newer to match Effect's runtime requirements.
|
|
8
|
+
|
|
9
|
+
Effect 4.1 promotes typed failures to defects when combined with cleanup defects. Snowflake transaction failures retain both the original error and the cleanup error in the combined Cause.
|
|
10
|
+
|
|
3
11
|
## 0.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ An Effect 4 client for Snowflake through Apache Arrow ADBC. Queries return Arrow
|
|
|
8
8
|
bun add @rc312/effect-snowflake effect apache-arrow@^21.1.0
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Use Node.js 22.
|
|
11
|
+
Use Node.js 22.19 or newer. This is a server-only package with a native dependency. The package includes the JavaScript ADBC driver manager; install the Snowflake shared-library driver separately:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
npm install -g @columnar-tech/dbc
|
|
@@ -128,7 +128,7 @@ const insert = db.transaction((tx) =>
|
|
|
128
128
|
|
|
129
129
|
Transactions reserve the connection, disable autocommit, and serialize work on the supplied session. Use `tx` inside the callback and await its work. Returning from the callback closes its child scope and expires the session before commit. Typed failures, defects, and interruption trigger rollback. Failed commits also attempt rollback. Successful completion or rollback restores autocommit.
|
|
130
130
|
|
|
131
|
-
Failed reader/statement cleanup, rollback, or autocommit restoration invalidates the client; no further operation is accepted. Recovering a cleanup defect within the callback still prevents commit: the transaction fails with operation `transaction.invalidated` and attempts rollback. Autocommit is never re-enabled after a failed rollback, because doing so could commit pending changes. Cleanup failures are preserved as defects alongside the original failure. Acquire a new client after invalidation.
|
|
131
|
+
Failed reader/statement cleanup, rollback, or autocommit restoration invalidates the client; no further operation is accepted. Recovering a cleanup defect within the callback still prevents commit: the transaction fails with operation `transaction.invalidated` and attempts rollback. Autocommit is never re-enabled after a failed rollback, because doing so could commit pending changes. Cleanup failures are preserved as defects alongside the original failure. In Effect 4.1, a cleanup defect also promotes the original typed failure to a defect in the combined Cause. Acquire a new client after invalidation.
|
|
132
132
|
|
|
133
133
|
Only the callback is interruptible. Once commit starts, the adapter finishes commit and autocommit restoration before releasing the connection. Interruption during a successful commit does not trigger a subsequent rollback; the caller may still observe interruption after the commit completes.
|
|
134
134
|
|
|
@@ -173,5 +173,3 @@ bun run lint
|
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
Unit tests use real Arrow IPC and controlled native resources for precision, acquisition and reader failures, serialized work, combined cleanup causes, transaction interruption, scope retirement, and tracing redaction. The examples and E2E sources are included in typechecking. Coverage reports are written under the package's ignored `coverage/` directory; the live suite runs separately from ordinary unit tests.
|
|
176
|
-
|
|
177
|
-
The lifecycle ownership helpers were adapted from the provided `effect-extensions-copy/src/waddler/snowflake.ts` reference implementation.
|
package/dist/adbc-driver.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/adbc-driver.js
CHANGED
|
File without changes
|
package/dist/adbc-driver.js.map
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.d.ts.map
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/index.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/internal/client.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/internal/native.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/internal/session.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/models.d.ts
CHANGED
|
File without changes
|
package/dist/models.d.ts.map
CHANGED
|
File without changes
|
package/dist/models.js
CHANGED
|
File without changes
|
package/dist/models.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/snowflake-error.js
CHANGED
|
File without changes
|
|
File without changes
|
package/examples/.env.example
CHANGED
|
File without changes
|
package/examples/README.md
CHANGED
|
@@ -15,7 +15,7 @@ cp packages/effect-snowflake/examples/.env.example packages/effect-snowflake/.en
|
|
|
15
15
|
|
|
16
16
|
Edit `packages/effect-snowflake/.env` for a development account, warehouse, database, and schema. The template uses JWT authentication and a private-key file path. For inline keys, remove `SNOWFLAKE_PRIVATE_KEY_PATH` and set `SNOWFLAKE_PRIVATE_KEY` to a PKCS#8 PEM. `SNOWFLAKE_PRIVATE_KEY_PASS` supplies an encrypted inline key's passphrase. For password authentication, set `SNOWFLAKE_AUTHENTICATOR=auth_snowflake` and `SNOWFLAKE_PASSWORD`; for OAuth use `auth_oauth` and `SNOWFLAKE_TOKEN`.
|
|
17
17
|
|
|
18
|
-
The examples need Node.js 22.
|
|
18
|
+
The examples need Node.js 22.19+ and Bun for workspace build scripts. The Node entrypoints load the package-local `.env` using `--env-file-if-exists`; exported environment variables take precedence. Real `.env` files are ignored by Git. Do not commit credentials. Secrets are loaded through `Config.Redacted`, and the configuration check never prints their values.
|
|
19
19
|
|
|
20
20
|
If manifest discovery is unavailable, set `SNOWFLAKE_ADBC_DRIVER` to the absolute path of an installed driver library or manifest. The shared configuration sets native login and network timeouts to 30 seconds and request retries to 60 seconds. These bound individual native operations; they are not an overall scenario deadline.
|
|
21
21
|
|
package/examples/check.ts
CHANGED
|
File without changes
|
package/examples/composition.ts
CHANGED
|
File without changes
|
package/examples/options.ts
CHANGED
|
File without changes
|
package/examples/query.ts
CHANGED
|
File without changes
|
package/examples/run.ts
CHANGED
|
File without changes
|
package/examples/scenarios.ts
CHANGED
|
File without changes
|
package/examples/stream.ts
CHANGED
|
File without changes
|
package/examples/transaction.ts
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rc312/effect-snowflake",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Scoped Effect 4 Snowflake client with Apache Arrow ADBC queries, streams, and transactions.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -46,16 +46,16 @@
|
|
|
46
46
|
"@apache-arrow/adbc-driver-manager": "~0.24.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@effect/vitest": "^4.
|
|
49
|
+
"@effect/vitest": "^4.1.2",
|
|
50
50
|
"@types/node": "^26.6.5",
|
|
51
51
|
"@vitest/coverage-v8": "5.0.4",
|
|
52
52
|
"vitest": "^5.0.4"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"apache-arrow": "^21.1.0",
|
|
56
|
-
"effect": "^4.
|
|
56
|
+
"effect": "^4.1.2"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
|
-
"node": ">=22.
|
|
59
|
+
"node": ">=22.19.0"
|
|
60
60
|
}
|
|
61
61
|
}
|
package/src/adbc-driver.ts
CHANGED
|
File without changes
|
package/src/index.ts
CHANGED
|
File without changes
|
package/src/internal/client.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/internal/native.ts
CHANGED
|
File without changes
|
package/src/internal/session.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/models.ts
CHANGED
|
File without changes
|
package/src/snowflake-error.ts
CHANGED
|
File without changes
|