orchid-orm 1.32.11 → 1.32.13
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/dist/index.d.ts +23 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -616,9 +616,32 @@ interface BaseTableClass<SchemaConfig extends ColumnSchemaConfig, ColumnTypes> e
|
|
|
616
616
|
getFilePath(): string;
|
|
617
617
|
new (): BaseTableInstance<ColumnTypes>;
|
|
618
618
|
instance(): BaseTableInstance<ColumnTypes>;
|
|
619
|
+
/**
|
|
620
|
+
* All column types for inserting.
|
|
621
|
+
*/
|
|
619
622
|
inputSchema: SchemaConfig['inputSchema'];
|
|
623
|
+
/**
|
|
624
|
+
* All column types as returned from a database.
|
|
625
|
+
*/
|
|
620
626
|
outputSchema: SchemaConfig['outputSchema'];
|
|
627
|
+
/**
|
|
628
|
+
* All column types for query methods such as `where`.
|
|
629
|
+
*/
|
|
621
630
|
querySchema: SchemaConfig['querySchema'];
|
|
631
|
+
/**
|
|
632
|
+
* Primary key column(s) type for query methods such as `where`.
|
|
633
|
+
*/
|
|
634
|
+
pkeySchema: SchemaConfig['pkeySchema'];
|
|
635
|
+
/**
|
|
636
|
+
* Column types for inserting, excluding primary keys.
|
|
637
|
+
* Equals to {@link inputSchema} without primary keys.
|
|
638
|
+
*/
|
|
639
|
+
createSchema: SchemaConfig['createSchema'];
|
|
640
|
+
/**
|
|
641
|
+
* Column types for updating, excluding primary keys.
|
|
642
|
+
* Equals to partial {@link createSchema}.
|
|
643
|
+
*/
|
|
644
|
+
updateSchema: SchemaConfig['updateSchema'];
|
|
622
645
|
}
|
|
623
646
|
declare function createBaseTable<SchemaConfig extends ColumnSchemaConfig = DefaultSchemaConfig, ColumnTypes = DefaultColumnTypes<SchemaConfig>>({ schemaConfig, columnTypes: columnTypesArg, snakeCase, filePath: filePathArg, nowSQL, exportAs, language, }?: {
|
|
624
647
|
schemaConfig?: SchemaConfig;
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,10 @@ function createBaseTable({
|
|
|
41
41
|
this.instance();
|
|
42
42
|
return this._querySchema === void 0 ? this._querySchema = schemaConfig.querySchema.call(this) : this._querySchema;
|
|
43
43
|
}
|
|
44
|
+
static createSchema() {
|
|
45
|
+
this.instance();
|
|
46
|
+
return this._createSchema === void 0 ? this._createSchema = schemaConfig.createSchema.call(this) : this._createSchema;
|
|
47
|
+
}
|
|
44
48
|
static updateSchema() {
|
|
45
49
|
this.instance();
|
|
46
50
|
return this._updateSchema === void 0 ? this._updateSchema = schemaConfig.updateSchema.call(this) : this._updateSchema;
|