@remix-run/data-table 0.0.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/LICENSE +21 -0
- package/README.md +549 -2
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/lib/adapter.d.ts +550 -0
- package/dist/lib/adapter.d.ts.map +1 -0
- package/dist/lib/adapter.js +1 -0
- package/dist/lib/column.d.ts +193 -0
- package/dist/lib/column.d.ts.map +1 -0
- package/dist/lib/column.js +302 -0
- package/dist/lib/database/execution-context.d.ts +10 -0
- package/dist/lib/database/execution-context.d.ts.map +1 -0
- package/dist/lib/database/execution-context.js +1 -0
- package/dist/lib/database/helpers.d.ts +26 -0
- package/dist/lib/database/helpers.d.ts.map +1 -0
- package/dist/lib/database/helpers.js +116 -0
- package/dist/lib/database/query-execution.d.ts +7 -0
- package/dist/lib/database/query-execution.d.ts.map +1 -0
- package/dist/lib/database/query-execution.js +401 -0
- package/dist/lib/database/relations.d.ts +4 -0
- package/dist/lib/database/relations.d.ts.map +1 -0
- package/dist/lib/database/relations.js +207 -0
- package/dist/lib/database/write-lifecycle.d.ts +13 -0
- package/dist/lib/database/write-lifecycle.d.ts.map +1 -0
- package/dist/lib/database/write-lifecycle.js +279 -0
- package/dist/lib/database.d.ts +264 -0
- package/dist/lib/database.d.ts.map +1 -0
- package/dist/lib/database.js +319 -0
- package/dist/lib/errors.d.ts +59 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +76 -0
- package/dist/lib/inflection.d.ts +3 -0
- package/dist/lib/inflection.d.ts.map +1 -0
- package/dist/lib/inflection.js +56 -0
- package/dist/lib/migrations/filename.d.ts +12 -0
- package/dist/lib/migrations/filename.d.ts.map +1 -0
- package/dist/lib/migrations/filename.js +20 -0
- package/dist/lib/migrations/helpers.d.ts +11 -0
- package/dist/lib/migrations/helpers.d.ts.map +1 -0
- package/dist/lib/migrations/helpers.js +77 -0
- package/dist/lib/migrations/journal-store.d.ts +15 -0
- package/dist/lib/migrations/journal-store.d.ts.map +1 -0
- package/dist/lib/migrations/journal-store.js +83 -0
- package/dist/lib/migrations/registry.d.ts +27 -0
- package/dist/lib/migrations/registry.d.ts.map +1 -0
- package/dist/lib/migrations/registry.js +51 -0
- package/dist/lib/migrations/runner.d.ts +20 -0
- package/dist/lib/migrations/runner.d.ts.map +1 -0
- package/dist/lib/migrations/runner.js +273 -0
- package/dist/lib/migrations/schema-api.d.ts +7 -0
- package/dist/lib/migrations/schema-api.d.ts.map +1 -0
- package/dist/lib/migrations/schema-api.js +326 -0
- package/dist/lib/migrations-node.d.ts +17 -0
- package/dist/lib/migrations-node.d.ts.map +1 -0
- package/dist/lib/migrations-node.js +65 -0
- package/dist/lib/migrations.d.ts +292 -0
- package/dist/lib/migrations.d.ts.map +1 -0
- package/dist/lib/migrations.js +38 -0
- package/dist/lib/operators.d.ts +154 -0
- package/dist/lib/operators.d.ts.map +1 -0
- package/dist/lib/operators.js +218 -0
- package/dist/lib/query.d.ts +159 -0
- package/dist/lib/query.d.ts.map +1 -0
- package/dist/lib/query.js +401 -0
- package/dist/lib/references.d.ts +41 -0
- package/dist/lib/references.d.ts.map +1 -0
- package/dist/lib/references.js +33 -0
- package/dist/lib/sql-helpers.d.ts +50 -0
- package/dist/lib/sql-helpers.d.ts.map +1 -0
- package/dist/lib/sql-helpers.js +111 -0
- package/dist/lib/sql.d.ts +45 -0
- package/dist/lib/sql.d.ts.map +1 -0
- package/dist/lib/sql.js +65 -0
- package/dist/lib/table.d.ts +569 -0
- package/dist/lib/table.d.ts.map +1 -0
- package/dist/lib/table.js +519 -0
- package/dist/lib/types.d.ts +4 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +1 -0
- package/dist/migrations/node.d.ts +2 -0
- package/dist/migrations/node.d.ts.map +1 -0
- package/dist/migrations/node.js +1 -0
- package/dist/migrations.d.ts +8 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +5 -0
- package/dist/operators.d.ts +3 -0
- package/dist/operators.d.ts.map +1 -0
- package/dist/operators.js +1 -0
- package/dist/sql-helpers.d.ts +3 -0
- package/dist/sql-helpers.d.ts.map +1 -0
- package/dist/sql-helpers.js +1 -0
- package/package.json +56 -7
- package/src/index.ts +198 -0
- package/src/lib/adapter.ts +653 -0
- package/src/lib/column.ts +384 -0
- package/src/lib/database/execution-context.ts +15 -0
- package/src/lib/database/helpers.ts +216 -0
- package/src/lib/database/query-execution.ts +638 -0
- package/src/lib/database/relations.ts +332 -0
- package/src/lib/database/write-lifecycle.ts +487 -0
- package/src/lib/database.ts +856 -0
- package/src/lib/errors.ts +119 -0
- package/src/lib/inflection.ts +69 -0
- package/src/lib/migrations/filename.ts +25 -0
- package/src/lib/migrations/helpers.ts +108 -0
- package/src/lib/migrations/journal-store.ts +122 -0
- package/src/lib/migrations/registry.ts +62 -0
- package/src/lib/migrations/runner.ts +374 -0
- package/src/lib/migrations/schema-api.ts +417 -0
- package/src/lib/migrations-node.ts +71 -0
- package/src/lib/migrations.ts +328 -0
- package/src/lib/operators.ts +436 -0
- package/src/lib/query.ts +958 -0
- package/src/lib/references.ts +78 -0
- package/src/lib/sql-helpers.ts +146 -0
- package/src/lib/sql.ts +84 -0
- package/src/lib/table.ts +1309 -0
- package/src/lib/types.ts +3 -0
- package/src/migrations/node.ts +1 -0
- package/src/migrations.ts +26 -0
- package/src/operators.ts +18 -0
- package/src/sql-helpers.ts +9 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
AdapterCapabilityOverrides,
|
|
3
|
+
AdapterCapabilities,
|
|
4
|
+
DataManipulationRequest,
|
|
5
|
+
DataMigrationRequest,
|
|
6
|
+
AddCheckChange,
|
|
7
|
+
AddCheckOperation,
|
|
8
|
+
AddColumnChange,
|
|
9
|
+
AddForeignKeyChange,
|
|
10
|
+
AddForeignKeyOperation,
|
|
11
|
+
AddPrimaryKeyChange,
|
|
12
|
+
AddUniqueChange,
|
|
13
|
+
AlterTableChange,
|
|
14
|
+
AlterTableOperation,
|
|
15
|
+
ChangeColumnChange,
|
|
16
|
+
CheckConstraint,
|
|
17
|
+
ColumnCheck,
|
|
18
|
+
ColumnComputed,
|
|
19
|
+
ColumnDefault,
|
|
20
|
+
ColumnDefinition,
|
|
21
|
+
ColumnTypeName,
|
|
22
|
+
CountOperation,
|
|
23
|
+
CreateIndexOperation,
|
|
24
|
+
CreateTableOperation,
|
|
25
|
+
DataMigrationResult,
|
|
26
|
+
DataMigrationOperation,
|
|
27
|
+
DataManipulationResult,
|
|
28
|
+
DataManipulationOperation,
|
|
29
|
+
DeleteOperation,
|
|
30
|
+
DatabaseAdapter,
|
|
31
|
+
DropCheckChange,
|
|
32
|
+
DropCheckOperation,
|
|
33
|
+
DropColumnChange,
|
|
34
|
+
DropForeignKeyChange,
|
|
35
|
+
DropForeignKeyOperation,
|
|
36
|
+
DropIndexOperation,
|
|
37
|
+
DropPrimaryKeyChange,
|
|
38
|
+
DropTableOperation,
|
|
39
|
+
DropUniqueChange,
|
|
40
|
+
ExistsOperation,
|
|
41
|
+
ForeignKeyAction,
|
|
42
|
+
ForeignKeyConstraint,
|
|
43
|
+
IndexDefinition,
|
|
44
|
+
IndexMethod,
|
|
45
|
+
InsertManyOperation,
|
|
46
|
+
InsertOperation,
|
|
47
|
+
JoinClause,
|
|
48
|
+
JoinType,
|
|
49
|
+
PrimaryKeyConstraint,
|
|
50
|
+
RawOperation,
|
|
51
|
+
RenameColumnChange,
|
|
52
|
+
RenameIndexOperation,
|
|
53
|
+
RenameTableOperation,
|
|
54
|
+
ReturningSelection,
|
|
55
|
+
SelectColumn,
|
|
56
|
+
SelectOperation,
|
|
57
|
+
SetTableCommentChange,
|
|
58
|
+
TableRef,
|
|
59
|
+
TransactionOptions,
|
|
60
|
+
TransactionToken,
|
|
61
|
+
UniqueConstraint,
|
|
62
|
+
UpdateOperation,
|
|
63
|
+
UpsertOperation,
|
|
64
|
+
} from './lib/adapter.ts'
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
DataTableAdapterError,
|
|
68
|
+
DataTableConstraintError,
|
|
69
|
+
DataTableError,
|
|
70
|
+
DataTableQueryError,
|
|
71
|
+
DataTableValidationError,
|
|
72
|
+
} from './lib/errors.ts'
|
|
73
|
+
|
|
74
|
+
export type {
|
|
75
|
+
AnyRelation,
|
|
76
|
+
AnyColumn,
|
|
77
|
+
AnyTable,
|
|
78
|
+
BelongsToOptions,
|
|
79
|
+
ColumnReference,
|
|
80
|
+
ColumnReferenceForQualifiedName,
|
|
81
|
+
HasManyOptions,
|
|
82
|
+
HasManyThroughOptions,
|
|
83
|
+
HasOneOptions,
|
|
84
|
+
KeySelector,
|
|
85
|
+
OrderByClause,
|
|
86
|
+
OrderDirection,
|
|
87
|
+
PrimaryKeyInput,
|
|
88
|
+
Relation,
|
|
89
|
+
RelationCardinality,
|
|
90
|
+
RelationKind,
|
|
91
|
+
RelationMapForTable,
|
|
92
|
+
Table,
|
|
93
|
+
TableAfterDelete,
|
|
94
|
+
TableAfterDeleteContext,
|
|
95
|
+
TableAfterRead,
|
|
96
|
+
TableAfterReadContext,
|
|
97
|
+
TableAfterReadResult,
|
|
98
|
+
TableAfterWrite,
|
|
99
|
+
TableAfterWriteContext,
|
|
100
|
+
TableBeforeDelete,
|
|
101
|
+
TableBeforeDeleteContext,
|
|
102
|
+
TableBeforeDeleteResult,
|
|
103
|
+
TableBeforeWrite,
|
|
104
|
+
TableBeforeWriteContext,
|
|
105
|
+
TableBeforeWriteResult,
|
|
106
|
+
TableColumnInput,
|
|
107
|
+
TableColumnName,
|
|
108
|
+
TableColumns,
|
|
109
|
+
TableLifecycleOperation,
|
|
110
|
+
TableName,
|
|
111
|
+
TablePrimaryKey,
|
|
112
|
+
TableReference,
|
|
113
|
+
TableRow,
|
|
114
|
+
TableRowWith,
|
|
115
|
+
TableColumnsDefinition,
|
|
116
|
+
TableValidate,
|
|
117
|
+
TableValidationContext,
|
|
118
|
+
TableWriteOperation,
|
|
119
|
+
TableValidationOperation,
|
|
120
|
+
TableValidationResult,
|
|
121
|
+
TimestampConfig,
|
|
122
|
+
TimestampOptions,
|
|
123
|
+
ValidationFailure,
|
|
124
|
+
ValidationIssue,
|
|
125
|
+
} from './lib/table.ts'
|
|
126
|
+
export {
|
|
127
|
+
belongsTo,
|
|
128
|
+
columnMetadataKey,
|
|
129
|
+
fail,
|
|
130
|
+
getTableColumns,
|
|
131
|
+
getTableColumnDefinitions,
|
|
132
|
+
getTableBeforeDelete,
|
|
133
|
+
getTableBeforeWrite,
|
|
134
|
+
getTableAfterDelete,
|
|
135
|
+
getTableAfterRead,
|
|
136
|
+
getTableAfterWrite,
|
|
137
|
+
getTableName,
|
|
138
|
+
getTablePrimaryKey,
|
|
139
|
+
getTableReference,
|
|
140
|
+
getTableTimestamps,
|
|
141
|
+
getTableValidator,
|
|
142
|
+
hasMany,
|
|
143
|
+
hasManyThrough,
|
|
144
|
+
hasOne,
|
|
145
|
+
table,
|
|
146
|
+
tableMetadataKey,
|
|
147
|
+
timestamps,
|
|
148
|
+
} from './lib/table.ts'
|
|
149
|
+
export type { ColumnNamespace } from './lib/column.ts'
|
|
150
|
+
export { ColumnBuilder, column } from './lib/column.ts'
|
|
151
|
+
|
|
152
|
+
export type { Predicate, WhereInput, WhereObject } from './lib/operators.ts'
|
|
153
|
+
export {
|
|
154
|
+
and,
|
|
155
|
+
between,
|
|
156
|
+
eq,
|
|
157
|
+
gt,
|
|
158
|
+
gte,
|
|
159
|
+
ilike,
|
|
160
|
+
inList,
|
|
161
|
+
isNull,
|
|
162
|
+
like,
|
|
163
|
+
lt,
|
|
164
|
+
lte,
|
|
165
|
+
ne,
|
|
166
|
+
notInList,
|
|
167
|
+
notNull,
|
|
168
|
+
or,
|
|
169
|
+
} from './lib/operators.ts'
|
|
170
|
+
|
|
171
|
+
export type { SqlStatement } from './lib/sql.ts'
|
|
172
|
+
export { rawSql, sql } from './lib/sql.ts'
|
|
173
|
+
|
|
174
|
+
export type {
|
|
175
|
+
CountOptions,
|
|
176
|
+
CreateManyResultOptions,
|
|
177
|
+
CreateManyRowsOptions,
|
|
178
|
+
CreateResultOptions,
|
|
179
|
+
CreateRowOptions,
|
|
180
|
+
DeleteManyOptions,
|
|
181
|
+
FindManyOptions,
|
|
182
|
+
FindOneOptions,
|
|
183
|
+
OrderByInput,
|
|
184
|
+
OrderByTuple,
|
|
185
|
+
QueryColumnTypesForTable,
|
|
186
|
+
QueryForTable,
|
|
187
|
+
QueryTableInput,
|
|
188
|
+
SingleTableColumn,
|
|
189
|
+
SingleTableWhere,
|
|
190
|
+
UpdateManyOptions,
|
|
191
|
+
UpdateOptions,
|
|
192
|
+
WriteResult,
|
|
193
|
+
WriteRowResult,
|
|
194
|
+
WriteRowsResult,
|
|
195
|
+
} from './lib/database.ts'
|
|
196
|
+
export { createDatabase, Database } from './lib/database.ts'
|
|
197
|
+
export type { AnyQuery } from './lib/query.ts'
|
|
198
|
+
export { Query, query } from './lib/query.ts'
|