@an5/adapters 0.2.0 → 0.2.2

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.
Files changed (43) hide show
  1. package/README.md +226 -226
  2. package/package.json +46 -38
  3. package/typescript/an5Adapter.d.ts +4 -2
  4. package/typescript/an5Adapter.js +58 -21
  5. package/typescript/browser.d.ts +5 -0
  6. package/typescript/browser.js +12 -0
  7. package/typescript/googlesheets/adapter.d.ts +3 -2
  8. package/typescript/googlesheets/adapter.js +77 -7
  9. package/typescript/googlesheets/an5SheetsAdapter.d.ts +1 -1
  10. package/typescript/googlesheets/config.d.ts +11 -0
  11. package/typescript/googlesheets/config.js +7 -0
  12. package/typescript/googlesheets/helpers.js +1 -1
  13. package/typescript/googlesheets/index.d.ts +2 -1
  14. package/typescript/googlesheets/retry.js +21 -8
  15. package/typescript/googlesheets/tableClient.js +4 -3
  16. package/typescript/index.d.ts +4 -2
  17. package/typescript/{an5Adapter.ts → src/an5Adapter.ts} +505 -474
  18. package/typescript/{base → src/base}/index.ts +3 -3
  19. package/typescript/{base → src/base}/metadata.ts +28 -28
  20. package/typescript/{base → src/base}/sql.ts +98 -98
  21. package/typescript/{base → src/base}/types.ts +24 -24
  22. package/typescript/src/browser.ts +6 -0
  23. package/typescript/{config.ts → src/config.ts} +95 -95
  24. package/typescript/{googlesheets → src/googlesheets}/adapter.ts +242 -167
  25. package/typescript/{googlesheets → src/googlesheets}/an5SheetsAdapter.ts +3 -3
  26. package/typescript/{googlesheets → src/googlesheets}/config.ts +44 -33
  27. package/typescript/{googlesheets → src/googlesheets}/helpers.ts +124 -124
  28. package/typescript/{googlesheets → src/googlesheets}/index.ts +3 -2
  29. package/typescript/{googlesheets → src/googlesheets}/parseConnectionString.ts +44 -44
  30. package/typescript/src/googlesheets/retry.ts +32 -0
  31. package/typescript/{googlesheets → src/googlesheets}/sqlExecutor.ts +301 -301
  32. package/typescript/{googlesheets → src/googlesheets}/tableClient.ts +435 -434
  33. package/typescript/{googlesheets → src/googlesheets}/types.ts +6 -6
  34. package/typescript/{index.ts → src/index.ts} +19 -15
  35. package/typescript/{mssql → src/mssql}/engine.ts +132 -132
  36. package/typescript/{mysql → src/mssql}/index.ts +1 -1
  37. package/typescript/{mysql → src/mysql}/engine.ts +80 -80
  38. package/typescript/{postgres → src/mysql}/index.ts +1 -1
  39. package/typescript/{postgres → src/postgres}/engine.ts +87 -87
  40. package/typescript/{sqlite → src/postgres}/index.ts +1 -1
  41. package/typescript/{sqlite → src/sqlite}/engine.ts +55 -55
  42. package/typescript/{mssql → src/sqlite}/index.ts +1 -1
  43. package/typescript/googlesheets/retry.ts +0 -23
package/README.md CHANGED
@@ -1,45 +1,45 @@
1
- # an5Adapters
2
-
1
+ # an5Adapters
2
+
3
3
  Standalone runtime adapters for AN5 ORM. Provides connection pooling, query execution, typed table clients in TypeScript, Python, .NET, and Google Sheets API.
4
4
 
5
5
  Adapters are runtime packages only. They do not import generated `an5Client` artifacts; generated clients or applications can pass model metadata explicitly when table-name mapping or field type coercion is needed.
6
-
7
- ## Features
8
-
9
- - **Connection pooling** — Managed connection pools with configurable limits
10
- - **Type-safe table clients** — Generic CRUD operations with type inference
11
- - **Full query support** — WHERE, ORDER BY, pagination, aggregates
12
- - **Vector search** — Cosine, euclidean, and dot product similarity
13
- - **Transactions** — Begin/commit/rollback with automatic cleanup
14
- - **Cross-language** — Same API in TypeScript, Python, and .NET
15
- - **Google Sheets** — Use spreadsheets as a database with the same CRUD API
16
-
17
- ## Installation
18
-
19
- ### TypeScript
20
-
21
- ```bash
22
- npm install @an5/adapters
23
- ```
24
-
25
- ### Python
26
-
27
- ```bash
28
- pip install an5-adapters
29
- ```
30
-
31
- ### .NET
32
-
33
- ```bash
34
- dotnet add package An5Adapters
35
- ```
36
-
37
- ## Usage
38
-
39
- ### TypeScript
40
-
41
- ```typescript
42
- import { createAn5Adapter, setAdapterMetadata } from '@an5/adapters';
6
+
7
+ ## Features
8
+
9
+ - **Connection pooling** — Managed connection pools with configurable limits
10
+ - **Type-safe table clients** — Generic CRUD operations with type inference
11
+ - **Full query support** — WHERE, ORDER BY, pagination, aggregates
12
+ - **Vector search** — Cosine, euclidean, and dot product similarity
13
+ - **Transactions** — Begin/commit/rollback with automatic cleanup
14
+ - **Cross-language** — Same API in TypeScript, Python, and .NET
15
+ - **Google Sheets** — Use spreadsheets as a database with the same CRUD API
16
+
17
+ ## Installation
18
+
19
+ ### TypeScript
20
+
21
+ ```bash
22
+ npm install an5-adapters
23
+ ```
24
+
25
+ ### Python
26
+
27
+ ```bash
28
+ pip install an5-adapters
29
+ ```
30
+
31
+ ### .NET
32
+
33
+ ```bash
34
+ dotnet add package An5Adapters
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ### TypeScript
40
+
41
+ ```typescript
42
+ import { createAn5Adapter, setAdapterMetadata } from 'an5-adapters';
43
43
 
44
44
  setAdapterMetadata({
45
45
  modelToTable: { User: 'dbo.users' },
@@ -50,27 +50,27 @@ setAdapterMetadata({
50
50
  },
51
51
  },
52
52
  });
53
-
54
- const db = createAn5Adapter({
55
- connectionString: 'sqlserver://localhost:1433;database=mydb;user=sa;password=pass',
56
- });
57
-
58
- // Table client
59
- const users = db.table<User>('users');
60
- await users.findMany({ where: { active: true }, take: 10 });
61
-
62
- // Raw queries
63
- const rows = await db.exec('SELECT * FROM users WHERE id = @id', { id: '123' });
64
-
65
- // Transactions
66
- await db.$transaction(async (tx) => {
67
- await tx.table('users').create({ data: { name: 'John' } });
68
- });
69
- ```
70
-
71
- ### Python
72
-
73
- ```python
53
+
54
+ const db = createAn5Adapter({
55
+ connectionString: 'sqlserver://localhost:1433;database=mydb;user=sa;password=pass',
56
+ });
57
+
58
+ // Table client
59
+ const users = db.table<User>('users');
60
+ await users.findMany({ where: { active: true }, take: 10 });
61
+
62
+ // Raw queries
63
+ const rows = await db.exec('SELECT * FROM users WHERE id = @id', { id: '123' });
64
+
65
+ // Transactions
66
+ await db.$transaction(async (tx) => {
67
+ await tx.table('users').create({ data: { name: 'John' } });
68
+ });
69
+ ```
70
+
71
+ ### Python
72
+
73
+ ```python
74
74
  from an5_adapter import create_an5_adapter
75
75
  from base.metadata import set_adapter_metadata
76
76
 
@@ -83,112 +83,112 @@ set_adapter_metadata({
83
83
  }
84
84
  },
85
85
  })
86
-
87
- db = create_an5_adapter("sqlserver://localhost:1433;database=mydb;user=sa;password=pass")
88
-
89
- # Table client
90
- users = db.table("User")
91
- users.find_many(where={"active": True}, take=10)
92
-
93
- # Raw queries
94
- rows = db.exec("SELECT * FROM users WHERE id = ?", params=["123"])
95
-
96
- # Transactions
97
- db.transaction(lambda tx: tx.table("User").create({"name": "John"}))
98
- ```
99
-
100
- ### .NET
101
-
102
- ```csharp
103
- using An5Orm;
104
-
105
- var db = new An5Adapter(connectionString);
106
-
107
- // Table client
108
- var users = db.Table<User>("dbo.users");
109
- var activeUsers = users.FindMany("IsActive = @p", new { p = true });
110
-
111
- // Raw queries
112
- var rows = db.QueryRaw("SELECT * FROM users WHERE Id = @id", new { id = "123" });
113
-
114
- // Transactions
115
- db.Transaction(tx => {
116
- tx.Table<User>("dbo.users").Create(new User { Name = "John" });
117
- });
118
- ```
119
-
120
- ### Google Sheets
121
-
122
- ```typescript
123
- import { createAn5Adapter } from '@an5/adapters';
124
86
 
125
- const db = createAn5Adapter({
126
- spreadsheetId: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms',
127
- // Option 1: client email + private key
128
- clientEmail: 'sa@project.iam.gserviceaccount.com',
129
- privateKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
130
- // Option 2: full service account JSON
131
- // credentials: { client_email: '...', private_key: '...' },
132
- // Optional: map model names to sheet names
133
- sheetMapping: { users: 'UsersData', orders: 'OrdersData' },
134
- });
135
-
136
- // Table client (same API as SQL adapters)
137
- const users = db.table<User>('users');
138
- await users.findMany({ where: { active: true }, take: 10 });
139
- await users.create({ data: { name: 'John', email: 'john@example.com' } });
140
- await users.update({ where: { email: 'john@example.com' }, data: { name: 'Johnny' } });
141
- await users.delete({ where: { email: 'john@example.com' } });
142
-
143
- // Raw range access (Google Sheets specific)
144
- const rawData = await db.readRange('Sheet1!A1:C10');
145
- await db.writeRange('Sheet1!A1:B2', [['Name', 'Age'], ['Alice', '30']]);
146
- await db.appendRange('Sheet1!A:A', [['Bob', '25']]);
147
-
148
- // Auto-creates sheet + header row on first create()
149
- await db.table('orders').create({ data: { id: '1', total: 100 } });
150
-
151
- // List, delete sheets
152
- const sheets = await db.listSheets();
153
- await db.deleteSheet('OldSheet');
154
-
155
- // Clear data (keeps headers) or delete all rows
156
- await db.table('users').clear();
157
- await db.table('users').deleteAll();
158
- ```
159
-
160
- ### Integrated factory (auto-detect adapter)
161
-
162
- ```typescript
163
- import { createAn5Adapter, createAdapter, An5Adapter } from '@an5/adapters';
164
-
165
- // Auto-detects from connection string
166
- const sqlDb = createAn5Adapter({ connectionString: 'sqlserver://localhost:1433;database=mydb;user=sa;password=pass' });
167
-
168
- const sheetsDb = createAn5Adapter({
169
- connectionString: 'googlesheets://spreadsheetId;clientEmail=sa@project.iam.gserviceaccount.com;privateKey=...',
170
- });
171
-
172
- // Or use the Sheets config object directly (also auto-detected)
173
- const sheetsDb2 = createAdapter({
174
- spreadsheetId: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms',
175
- clientEmail: 'sa@project.iam.gserviceaccount.com',
176
- privateKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
177
- });
178
-
179
- // Constructor form also delegates googlesheets:// to the Sheets adapter
180
- const sheetsDb3 = new An5Adapter({
181
- connectionString: 'googlesheets://spreadsheetId;clientEmail=sa@project.iam.gserviceaccount.com;privateKey=...',
182
- });
183
- ```
184
-
185
- **Notes:**
186
- - Each model/table maps to a **sheet tab** (first row = headers)
187
- - Sheets without header rows get auto-created on first `create()`
188
- - Type coercion can use optional adapter metadata (`setAdapterMetadata`) for field types and model-to-table mapping
189
- - Numeric strings (without leading zeros) are auto-coerced; `"00123"` stays string
190
- - Boolean strings `"true"` / `"false"` are auto-coerced
191
- - Sheet names with spaces are automatically escaped (A1 notation)
87
+ db = create_an5_adapter("sqlserver://localhost:1433;database=mydb;user=sa;password=pass")
88
+
89
+ # Table client
90
+ users = db.table("User")
91
+ users.find_many(where={"active": True}, take=10)
92
+
93
+ # Raw queries
94
+ rows = db.exec("SELECT * FROM users WHERE id = ?", params=["123"])
95
+
96
+ # Transactions
97
+ db.transaction(lambda tx: tx.table("User").create({"name": "John"}))
98
+ ```
99
+
100
+ ### .NET
101
+
102
+ ```csharp
103
+ using An5Orm;
104
+
105
+ var db = new An5Adapter(connectionString);
106
+
107
+ // Table client
108
+ var users = db.Table<User>("dbo.users");
109
+ var activeUsers = users.FindMany("IsActive = @p", new { p = true });
110
+
111
+ // Raw queries
112
+ var rows = db.QueryRaw("SELECT * FROM users WHERE Id = @id", new { id = "123" });
113
+
114
+ // Transactions
115
+ db.Transaction(tx => {
116
+ tx.Table<User>("dbo.users").Create(new User { Name = "John" });
117
+ });
118
+ ```
119
+
120
+ ### Google Sheets
121
+
122
+ ```typescript
123
+ import { createAn5SheetsAdapter } from 'an5-adapters';
124
+
125
+ const db = createAn5SheetsAdapter({
126
+ spreadsheetId: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms',
127
+ // Option 1: client email + private key
128
+ clientEmail: 'sa@project.iam.gserviceaccount.com',
129
+ privateKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
130
+ // Option 2: full service account JSON
131
+ // credentials: { client_email: '...', private_key: '...' },
132
+ // Optional: map model names to sheet names
133
+ sheetMapping: { users: 'UsersData', orders: 'OrdersData' },
134
+ });
135
+
136
+ // Table client (same API as SQL adapters)
137
+ const users = db.table<User>('users');
138
+ await users.findMany({ where: { active: true }, take: 10 });
139
+ await users.create({ data: { name: 'John', email: 'john@example.com' } });
140
+ await users.update({ where: { email: 'john@example.com' }, data: { name: 'Johnny' } });
141
+ await users.delete({ where: { email: 'john@example.com' } });
142
+
143
+ // Raw range access (Google Sheets specific)
144
+ const rawData = await db.readRange('Sheet1!A1:C10');
145
+ await db.writeRange('Sheet1!A1:B2', [['Name', 'Age'], ['Alice', '30']]);
146
+ await db.appendRange('Sheet1!A:A', [['Bob', '25']]);
147
+
148
+ // Auto-creates sheet + header row on first create()
149
+ await db.table('orders').create({ data: { id: '1', total: 100 } });
150
+
151
+ // List, delete sheets
152
+ const sheets = await db.listSheets();
153
+ await db.deleteSheet('OldSheet');
154
+
155
+ // Clear data (keeps headers) or delete all rows
156
+ await db.table('users').clear();
157
+ await db.table('users').deleteAll();
158
+ ```
159
+
160
+ ### Integrated factory (auto-detect adapter)
161
+
162
+ ```typescript
163
+ import { createAn5Adapter, createAdapter, An5Adapter } from 'an5-adapters';
164
+
165
+ // Auto-detects from connection string
166
+ const sqlDb = createAn5Adapter({ connectionString: 'sqlserver://localhost:1433;database=mydb;user=sa;password=pass' });
167
+
168
+ const sheetsDb = createAn5Adapter({
169
+ connectionString: 'googlesheets://spreadsheetId;clientEmail=sa@project.iam.gserviceaccount.com;privateKey=...',
170
+ });
171
+
172
+ // Or use the Sheets config object directly (also auto-detected)
173
+ const sheetsDb2 = createAdapter({
174
+ spreadsheetId: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms',
175
+ clientEmail: 'sa@project.iam.gserviceaccount.com',
176
+ privateKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
177
+ });
178
+
179
+ // Constructor form also delegates googlesheets:// to the Sheets adapter
180
+ const sheetsDb3 = new An5Adapter({
181
+ connectionString: 'googlesheets://spreadsheetId;clientEmail=sa@project.iam.gserviceaccount.com;privateKey=...',
182
+ });
183
+ ```
184
+
185
+ **Notes:**
186
+ - Each model/table maps to a **sheet tab** (first row = headers)
187
+ - Sheets without header rows get auto-created on first `create()`
188
+ - Type coercion can use optional adapter metadata (`setAdapterMetadata`) for field types and model-to-table mapping
189
+ - Numeric strings (without leading zeros) are auto-coerced; `"00123"` stays string
190
+ - Boolean strings `"true"` / `"false"` are auto-coerced
191
+ - Sheet names with spaces are automatically escaped (A1 notation)
192
192
  - Supports service account JSON or individual `clientEmail`+`privateKey`
193
193
  - Automatic retry with exponential backoff for rate limits (429/500/503)
194
194
 
@@ -197,67 +197,67 @@ const sheetsDb3 = new An5Adapter({
197
197
  Use the package root for normal applications:
198
198
 
199
199
  ```typescript
200
- import { createAn5Adapter } from '@an5/adapters';
200
+ import { createAn5Adapter, createAn5SheetsAdapter } from 'an5-adapters';
201
201
  ```
202
202
 
203
203
  Provider folders are still available to source-level consumers through `typescript/*`, but the public factory in `typescript/an5Adapter.ts` is the preferred entry point. The old `unified.ts` entry point has been removed because the factory now lives directly in `An5Adapter`.
204
-
205
- ## API Reference
206
-
207
- ### An5Adapter / An5SheetsAdapter
208
-
209
- | Method | Description |
210
- |--------|-------------|
211
- | `exec(query, params)` | Execute query, return rows (SQL only) |
212
- | `table<T>(name)` | Get typed table client |
213
- | `$transaction(fn)` | Execute in transaction |
214
- | `$connect()` | Open connection / authenticate |
215
- | `$disconnect()` | Close connection / clear auth |
216
- | `readRange(range)` | Read raw sheet range (Sheets only) |
217
- | `writeRange(range, values)` | Write raw sheet range (Sheets only) |
218
- | `appendRange(range, values)` | Append rows to sheet (Sheets only) |
219
- | `listSheets()` | List all sheet tab names (Sheets only) |
220
- | `deleteSheet(name)` | Delete a sheet tab (Sheets only) |
221
-
222
- ### AdapterTableClient / SheetsTableClient
223
-
224
- | Method | Description |
225
- |--------|-------------|
226
- | `findMany(args)` | Query multiple rows |
227
- | `findFirst(args)` | Query single row |
228
- | `findUnique(where)` | Find by unique key |
229
- | `count(where)` | Count rows |
230
- | `create(data)` | Insert row |
231
- | `createMany(data)` | Bulk insert |
232
- | `update(where, data)` | Update row |
233
- | `updateMany(where, data)` | Update multiple rows |
234
- | `delete(where)` | Delete row |
235
- | `deleteMany(where)` | Delete multiple rows |
236
- | `upsert(where, create, update)` | Insert or update |
237
- | `aggregate(args)` | SUM, AVG, MIN, MAX, COUNT |
238
- | `groupBy(args)` | Group by fields |
239
- | `vectorSearch(args)` | Semantic similarity search |
240
- | `clear()` | Clear all data rows, keep headers (Sheets only) |
241
- | `deleteAll()` | Delete all data rows including headers (Sheets only) |
242
-
243
- ## Provider Layout
244
-
245
- - TypeScript providers live under `typescript/{base,mssql,postgres,mysql,sqlite,googlesheets}`.
246
- - Python providers live under `python/{base,mssql,postgres}`, with `python/an5_adapter.py` kept as the public facade.
247
- - .NET providers live under `dotnet/{Base,Mssql,Postgres}`, with `dotnet/an5Adapter.cs` kept as the public facade.
248
- - Adapters do not depend on generated `an5Client` artifacts; generated clients may pass metadata in explicitly when they need model/table mapping.
249
-
250
- ## Testing
251
-
252
- ```bash
253
- # TypeScript/Node
254
- node test/unit.test.js
255
-
256
- # Python
257
- python -m compileall python
258
- python test/smoke.py
259
- ```
260
-
261
- ## License
262
-
263
- MIT
204
+
205
+ ## API Reference
206
+
207
+ ### An5Adapter / An5SheetsAdapter
208
+
209
+ | Method | Description |
210
+ |--------|-------------|
211
+ | `exec(query, params)` | Execute query, return rows (SQL only) |
212
+ | `table<T>(name)` | Get typed table client |
213
+ | `$transaction(fn)` | Execute in transaction |
214
+ | `$connect()` | Open connection / authenticate |
215
+ | `$disconnect()` | Close connection / clear auth |
216
+ | `readRange(range)` | Read raw sheet range (Sheets only) |
217
+ | `writeRange(range, values)` | Write raw sheet range (Sheets only) |
218
+ | `appendRange(range, values)` | Append rows to sheet (Sheets only) |
219
+ | `listSheets()` | List all sheet tab names (Sheets only) |
220
+ | `deleteSheet(name)` | Delete a sheet tab (Sheets only) |
221
+
222
+ ### AdapterTableClient / SheetsTableClient
223
+
224
+ | Method | Description |
225
+ |--------|-------------|
226
+ | `findMany(args)` | Query multiple rows |
227
+ | `findFirst(args)` | Query single row |
228
+ | `findUnique(where)` | Find by unique key |
229
+ | `count(where)` | Count rows |
230
+ | `create(data)` | Insert row |
231
+ | `createMany(data)` | Bulk insert |
232
+ | `update(where, data)` | Update row |
233
+ | `updateMany(where, data)` | Update multiple rows |
234
+ | `delete(where)` | Delete row |
235
+ | `deleteMany(where)` | Delete multiple rows |
236
+ | `upsert(where, create, update)` | Insert or update |
237
+ | `aggregate(args)` | SUM, AVG, MIN, MAX, COUNT |
238
+ | `groupBy(args)` | Group by fields |
239
+ | `vectorSearch(args)` | Semantic similarity search |
240
+ | `clear()` | Clear all data rows, keep headers (Sheets only) |
241
+ | `deleteAll()` | Delete all data rows including headers (Sheets only) |
242
+
243
+ ## Provider Layout
244
+
245
+ - TypeScript providers live under `typescript/{base,mssql,postgres,mysql,sqlite,googlesheets}`.
246
+ - Python providers live under `python/{base,mssql,postgres}`, with `python/an5_adapter.py` kept as the public facade.
247
+ - .NET providers live under `dotnet/{Base,Mssql,Postgres}`, with `dotnet/an5Adapter.cs` kept as the public facade.
248
+ - Adapters do not depend on generated `an5-client` artifacts; generated clients may pass metadata in explicitly when they need model/table mapping.
249
+
250
+ ## Testing
251
+
252
+ ```bash
253
+ # TypeScript/Node
254
+ node test/unit.test.js
255
+
256
+ # Python
257
+ python -m compileall python
258
+ python test/smoke.py
259
+ ```
260
+
261
+ ## License
262
+
263
+ MIT
package/package.json CHANGED
@@ -1,46 +1,54 @@
1
- {
1
+ {
2
2
  "name": "@an5/adapters",
3
- "version": "0.2.0",
4
- "description": "Standalone language adapters for AN5 ORM - TypeScript, Python, .NET query execution.",
5
- "license": "MIT",
6
- "main": "typescript/index.js",
7
- "types": "typescript/index.d.ts",
8
- "exports": {
9
- ".": "./typescript/index.js",
10
- "./typescript": "./typescript/index.js",
11
- "./typescript/*": "./typescript/*",
12
- "./python": "./python/an5_adapter.py",
13
- "./dotnet": "./dotnet/An5Adapter.cs",
14
- "./config": "./typescript/config.js"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/an5ORM/an5Adapters.git"
19
- },
20
- "keywords": ["an5", "orm", "adapter", "typescript", "python", "dotnet"],
3
+ "version": "0.2.2",
4
+ "description": "Standalone language adapters for AN5 ORM - TypeScript, Python, .NET query execution.",
5
+ "license": "MIT",
6
+ "main": "typescript/index.js",
7
+ "types": "typescript/index.d.ts",
8
+ "exports": {
9
+ ".": "./typescript/index.js",
10
+ "./browser": "./typescript/browser.js",
11
+ "./typescript": "./typescript/index.js",
12
+ "./typescript/*": "./typescript/*",
13
+ "./python": "./python/an5_adapter.py",
14
+ "./dotnet": "./dotnet/An5Adapter.cs",
15
+ "./config": "./typescript/config.js"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/an5ORM/an5Adapters.git"
20
+ },
21
+ "keywords": [
22
+ "an5",
23
+ "orm",
24
+ "adapter",
25
+ "typescript",
26
+ "python",
27
+ "dotnet"
28
+ ],
21
29
  "files": [
22
30
  "typescript/**/*.{ts,js,d.ts}",
23
31
  "python/**/*.py",
24
32
  "dotnet/**/*",
25
33
  "README.md"
26
34
  ],
27
- "scripts": {
35
+ "scripts": {
28
36
  "build": "tsc -p tsconfig.json",
29
- "test": "node test/unit.test.js",
30
- "test:python": "python -m compileall python 2>&1"
31
- },
32
- "dependencies": {
33
- "googleapis": "^134.0.0",
34
- "mssql": "^12.5.5",
35
- "pg": "^8.13.0"
36
- },
37
- "devDependencies": {
38
- "@types/mssql": "^9.1.8",
39
- "@types/node": "^20.11.0",
40
- "@types/pg": "^8.11.0",
41
- "typescript": "^6.0.3"
42
- },
43
- "publishConfig": {
44
- "access": "public"
45
- }
46
- }
37
+ "test": "node test/unit.test.js",
38
+ "test:python": "python -m compileall python 2>&1"
39
+ },
40
+ "dependencies": {
41
+ "googleapis": "^134.0.0",
42
+ "mssql": "^12.5.5",
43
+ "pg": "^8.13.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/mssql": "^9.1.8",
47
+ "@types/node": "^20.11.0",
48
+ "@types/pg": "^8.11.0",
49
+ "typescript": "^6.0.3"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ }
54
+ }
@@ -7,8 +7,10 @@ export type AnyAdapterConfig = An5AdapterConfig | An5SheetsAdapterConfig | {
7
7
  connectionString: string;
8
8
  };
9
9
  export declare class An5Adapter {
10
- private engine;
11
- private sheetsAdapter;
10
+ private _engine;
11
+ private _engineType;
12
+ private _engineConfig;
13
+ sheetsAdapter: An5SheetsAdapter | null;
12
14
  get dialect(): Dialect;
13
15
  constructor(adapterConfig: An5AdapterConfig | An5SheetsAdapterConfig);
14
16
  private requireEngine;