@tstdl/base 0.93.21 → 0.93.23
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/application/application.js +3 -3
- package/authentication/server/module.d.ts +1 -1
- package/authentication/server/module.js +1 -6
- package/document-management/api/document-management.api.d.ts +0 -4
- package/document-management/service-models/document.service-model.d.ts +0 -2
- package/injector/injector.js +22 -22
- package/injector/resolve-chain.d.ts +7 -5
- package/injector/resolve-chain.js +16 -14
- package/logger/manager.js +3 -3
- package/orm/data-types/bytea.d.ts +4 -14
- package/orm/data-types/bytea.js +2 -2
- package/orm/data-types/common.d.ts +18 -0
- package/orm/data-types/common.js +11 -0
- package/orm/data-types/index.d.ts +1 -0
- package/orm/data-types/index.js +1 -0
- package/orm/data-types/numeric-date.d.ts +4 -15
- package/orm/data-types/numeric-date.js +2 -2
- package/orm/data-types/timestamp.d.ts +4 -15
- package/orm/data-types/timestamp.js +2 -2
- package/orm/data-types/tsvector.d.ts +3 -13
- package/orm/data-types/tsvector.js +2 -2
- package/orm/decorators.d.ts +16 -54
- package/orm/decorators.js +24 -37
- package/orm/entity.d.ts +6 -9
- package/orm/entity.js +1 -2
- package/orm/query.d.ts +199 -61
- package/orm/query.js +2 -2
- package/orm/repository.types.d.ts +38 -9
- package/orm/server/drizzle/schema-converter.js +40 -118
- package/orm/server/query-converter.d.ts +21 -7
- package/orm/server/query-converter.js +194 -38
- package/orm/server/repository.d.ts +39 -22
- package/orm/server/repository.js +141 -71
- package/orm/server/types.d.ts +10 -2
- package/orm/sqls.d.ts +14 -16
- package/orm/sqls.js +34 -17
- package/package.json +2 -2
- package/test/drizzle/0000_nervous_iron_monger.sql +9 -0
- package/test/drizzle/meta/0000_snapshot.json +27 -7
- package/test/drizzle/meta/_journal.json +2 -44
- package/test/test.model.js +2 -6
- package/test1.js +18 -5
- package/test6.js +23 -35
- package/types/types.d.ts +8 -5
- package/utils/equals.js +2 -2
- package/utils/format-error.js +2 -2
- package/utils/helpers.js +3 -2
- package/utils/object/object.d.ts +4 -4
- package/test/drizzle/0000_sudden_sphinx.sql +0 -9
- package/test/drizzle/0001_organic_rhodey.sql +0 -2
- package/test/drizzle/0002_nice_squadron_supreme.sql +0 -1
- package/test/drizzle/0003_serious_mockingbird.sql +0 -1
- package/test/drizzle/0004_complete_pixie.sql +0 -1
- package/test/drizzle/0005_bumpy_sabra.sql +0 -1
- package/test/drizzle/0006_overrated_post.sql +0 -6
- package/test/drizzle/meta/0001_snapshot.json +0 -79
- package/test/drizzle/meta/0002_snapshot.json +0 -63
- package/test/drizzle/meta/0003_snapshot.json +0 -73
- package/test/drizzle/meta/0004_snapshot.json +0 -89
- package/test/drizzle/meta/0005_snapshot.json +0 -104
- package/test/drizzle/meta/0006_snapshot.json +0 -104
package/test/test.model.js
CHANGED
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { BaseEntity,
|
|
10
|
+
import { BaseEntity, Index } from '../orm/index.js';
|
|
11
11
|
import { StringProperty } from '../schema/index.js';
|
|
12
12
|
let Test = class Test extends BaseEntity {
|
|
13
13
|
title;
|
|
@@ -32,11 +32,7 @@ __decorate([
|
|
|
32
32
|
__metadata("design:type", String)
|
|
33
33
|
], Test.prototype, "language", void 0);
|
|
34
34
|
Test = __decorate([
|
|
35
|
-
|
|
36
|
-
source: ['title', 'content', 'tags'],
|
|
37
|
-
vector: { weights: { title: 'A', content: 'B', tags: 'C' } },
|
|
38
|
-
trigram: {},
|
|
39
|
-
})
|
|
35
|
+
Index(['id', 'title', 'content', 'tags'], { using: 'bm25', with: { key_field: `'id'` } })
|
|
40
36
|
], Test);
|
|
41
37
|
export { Test };
|
|
42
38
|
export const testData = [
|
package/test1.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import './polyfills.js';
|
|
2
2
|
import { Application, provideInitializer, provideModule, provideSignalHandler } from './application/index.js';
|
|
3
3
|
import { migrateAuditSchema } from './audit/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { AuthenticationService } from './authentication/server/authentication.service.js';
|
|
5
|
+
import { configureAuthenticationServer } from './authentication/server/module.js';
|
|
6
|
+
import { inject, injectAsync, Injector, runInInjectionContext } from './injector/index.js';
|
|
7
|
+
import { configurePostgresKeyValueStore, migratePostgresKeyValueStoreSchema } from './key-value-store/postgres/module.js';
|
|
5
8
|
import { configurePostgresLock, migratePostgresLockSchema } from './lock/postgres/index.js';
|
|
6
9
|
import { PrettyPrintLogFormatter, provideConsoleLogTransport } from './logger/index.js';
|
|
7
10
|
import { configureOrm, injectRepository } from './orm/server/index.js';
|
|
@@ -32,8 +35,15 @@ async function bootstrap() {
|
|
|
32
35
|
database: config.database.database,
|
|
33
36
|
},
|
|
34
37
|
});
|
|
38
|
+
configureAuthenticationServer({
|
|
39
|
+
serviceOptions: {
|
|
40
|
+
secret: '6fze56uz5e6ufrtzufrtu',
|
|
41
|
+
},
|
|
42
|
+
});
|
|
35
43
|
configurePostgresLock();
|
|
36
44
|
configurePostgresQueue();
|
|
45
|
+
configurePostgresKeyValueStore();
|
|
46
|
+
await runInInjectionContext(injector, migratePostgresKeyValueStoreSchema);
|
|
37
47
|
await runInInjectionContext(injector, migratePostgresLockSchema);
|
|
38
48
|
await runInInjectionContext(injector, migratePostgresQueueSchema);
|
|
39
49
|
await runInInjectionContext(injector, migrateAuditSchema);
|
|
@@ -41,13 +51,16 @@ async function bootstrap() {
|
|
|
41
51
|
}
|
|
42
52
|
async function main(_cancellationSignal) {
|
|
43
53
|
const repository = injectRepository(Test);
|
|
54
|
+
const authService = await injectAsync(AuthenticationService);
|
|
44
55
|
if (await repository.count() == 0) {
|
|
45
56
|
await repository.insertMany(testData);
|
|
46
57
|
}
|
|
47
|
-
const result = await repository.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
const result = await repository.search({
|
|
59
|
+
query: {
|
|
60
|
+
$parade: {
|
|
61
|
+
all: null,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
51
64
|
});
|
|
52
65
|
console.log(result);
|
|
53
66
|
}
|
package/test6.js
CHANGED
|
@@ -4,50 +4,38 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
7
|
import { Application } from './application/application.js';
|
|
11
8
|
import { provideModule, provideSignalHandler } from './application/providers.js';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function integer() {
|
|
20
|
-
if (isInschemaContext()) {
|
|
21
|
-
return { type: 'integer' };
|
|
22
|
-
}
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
9
|
+
import { NotImplementedError } from './errors/not-implemented.error.js';
|
|
10
|
+
import { Singleton } from './injector/decorators.js';
|
|
11
|
+
import { inject } from './injector/index.js';
|
|
12
|
+
import { injectionToken } from './injector/token.js';
|
|
13
|
+
import { PrettyPrintLogFormatter, provideConsoleLogTransport } from './logger/index.js';
|
|
14
|
+
import { _throw } from './utils/throw.js';
|
|
15
|
+
const MY_INTEGER = injectionToken('MyInteger');
|
|
25
16
|
// current method
|
|
26
17
|
let Foo = class Foo {
|
|
27
|
-
|
|
18
|
+
bar = inject(Bar);
|
|
28
19
|
};
|
|
29
|
-
__decorate([
|
|
30
|
-
Integer(),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], Foo.prototype, "age", void 0);
|
|
33
20
|
Foo = __decorate([
|
|
34
|
-
|
|
21
|
+
Singleton({
|
|
22
|
+
providers: [
|
|
23
|
+
{ provide: MY_INTEGER, useFactory: () => _throw(new NotImplementedError()) },
|
|
24
|
+
],
|
|
25
|
+
})
|
|
35
26
|
], Foo);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
console.log(
|
|
45
|
-
console.log(new Bar());
|
|
46
|
-
runInschemaContext(undefined, () => {
|
|
47
|
-
console.log(new Bar());
|
|
48
|
-
});
|
|
27
|
+
let Bar = class Bar {
|
|
28
|
+
myInteger = inject(MY_INTEGER);
|
|
29
|
+
};
|
|
30
|
+
Bar = __decorate([
|
|
31
|
+
Singleton()
|
|
32
|
+
], Bar);
|
|
33
|
+
function main() {
|
|
34
|
+
const foo = inject(Foo);
|
|
35
|
+
console.log(foo);
|
|
49
36
|
}
|
|
50
37
|
Application.run('Test', [
|
|
51
38
|
provideModule(main),
|
|
39
|
+
provideConsoleLogTransport(PrettyPrintLogFormatter),
|
|
52
40
|
provideSignalHandler(),
|
|
53
41
|
]);
|
package/types/types.d.ts
CHANGED
|
@@ -83,6 +83,9 @@ export type StringNumberMap<T = any> = {
|
|
|
83
83
|
};
|
|
84
84
|
export type OneOrMany<T> = T | readonly T[];
|
|
85
85
|
export type WritableOneOrMany<T> = T | T[];
|
|
86
|
+
export type Entries<T> = Extract<{
|
|
87
|
+
[K in keyof T]: [K, T[K]];
|
|
88
|
+
}[keyof T], any[]>[];
|
|
86
89
|
type FromEntriesEntryValue<T extends readonly (readonly [any, any])[], K> = Extract<T[number], readonly [K, any]>[1];
|
|
87
90
|
export type FromEntries<T> = T extends readonly (readonly [infer Key, any])[] ? {
|
|
88
91
|
[K in Cast<Key, PropertyKey>]: Fallback<FromEntriesEntryValue<T, K>, T[number][1]>;
|
|
@@ -202,12 +205,12 @@ export type DeepPartialObject<T> = {
|
|
|
202
205
|
export type DeepPartialArray<T> = DeepPartial<T>[];
|
|
203
206
|
export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
|
|
204
207
|
export type BinaryData<T extends ArrayBufferLike = ArrayBufferLike> = ArrayBufferView<T> | T;
|
|
205
|
-
export type
|
|
206
|
-
[K in keyof T]-?: K extends string | number ? `${K}` | `${K}.${
|
|
208
|
+
export type Path<T extends Record> = T extends object ? {
|
|
209
|
+
[K in keyof T]-?: K extends string | number ? `${K}` | `${K}.${Path<T[K]>}` : never;
|
|
207
210
|
}[keyof T] : never;
|
|
208
|
-
export type TypeFromPath<T extends Record,
|
|
209
|
-
[K in
|
|
210
|
-
}[
|
|
211
|
+
export type TypeFromPath<T extends Record, P extends Path<T> | string> = {
|
|
212
|
+
[K in P]: K extends keyof T ? T[K] : K extends `${infer P}.${infer S}` ? T[P] extends Record ? TypeFromPath<T[P], S> : never : never;
|
|
213
|
+
}[P];
|
|
211
214
|
export type ConstructorParameterDecorator = (target: object, propertyKey: undefined, parameterIndex: number) => void;
|
|
212
215
|
export type ReactiveValue<T> = T | Signal<T> | Observable<T>;
|
|
213
216
|
export type PascalCase<Value> = CamelCase<Value> extends string ? Capitalize<CamelCase<Value>> : CamelCase<Value>;
|
package/utils/equals.js
CHANGED
|
@@ -3,7 +3,7 @@ import { toUint8Array } from './binary.js';
|
|
|
3
3
|
import { compareByValue } from './comparison.js';
|
|
4
4
|
import { sort } from './iterable-helpers/sort.js';
|
|
5
5
|
import { objectKeys } from './object/object.js';
|
|
6
|
-
import { isDefined, isNotNull, isNull } from './type-guards.js';
|
|
6
|
+
import { isArray, isDefined, isNotNull, isNull } from './type-guards.js';
|
|
7
7
|
const equalsSymbol = Symbol('equals');
|
|
8
8
|
export const Equals = {
|
|
9
9
|
symbol: equalsSymbol,
|
|
@@ -60,7 +60,7 @@ export function equals(a, b, options = {}, visitedNodes = new Set()) {
|
|
|
60
60
|
return false;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
if (
|
|
63
|
+
if (isArray(a)) {
|
|
64
64
|
return (options.arrayDeep != false && (options.deep == true || options.arrayDeep == true))
|
|
65
65
|
? arrayEquals(a, b, { sort: (options.sortArray == true) ? compareByValue : undefined, comparator: (x, y) => equals(x, y, options, visitedNodes) })
|
|
66
66
|
: a === b;
|
package/utils/format-error.js
CHANGED
|
@@ -2,7 +2,7 @@ import { unwrapError } from '../errors/utils.js';
|
|
|
2
2
|
import { decycle } from './object/decycle.js';
|
|
3
3
|
import { objectKeys } from './object/object.js';
|
|
4
4
|
import { tryChain } from './try-chain.js';
|
|
5
|
-
import { isDefined, isFunction, isObject, isUndefined } from './type-guards.js';
|
|
5
|
+
import { isArray, isDefined, isFunction, isObject, isUndefined } from './type-guards.js';
|
|
6
6
|
/**
|
|
7
7
|
* Enhanced error formatting
|
|
8
8
|
*/
|
|
@@ -66,7 +66,7 @@ export function formatError(error, options = {}) {
|
|
|
66
66
|
const causeString = includeStack && cause
|
|
67
67
|
? formatNestedError('Caused by:', cause, { ...options, depth: depth - 1 })
|
|
68
68
|
: '';
|
|
69
|
-
const aggregateErrorsString =
|
|
69
|
+
const aggregateErrorsString = isArray(aggregateErrors)
|
|
70
70
|
? aggregateErrors.map((err, i) => formatNestedError(`Sub-error #${i + 1}:`, err, { ...options, depth: depth - 1 })).join('')
|
|
71
71
|
: '';
|
|
72
72
|
return `${nameString}${message}${restString}${extraInfoString}${stackString}${causeString}${aggregateErrorsString}`;
|
package/utils/helpers.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DetailsError } from '../errors/details.error.js';
|
|
2
2
|
import { supportsNotification } from '../supports.js';
|
|
3
3
|
import { decycle } from './object/decycle.js';
|
|
4
|
+
import { isArray } from './type-guards.js';
|
|
4
5
|
/**
|
|
5
6
|
* Create an structured clone of an value using Notification if available, otherwise history state (may alters history)
|
|
6
7
|
*
|
|
@@ -29,13 +30,13 @@ export async function structuredCloneAsync(value, options) {
|
|
|
29
30
|
const { port1, port2 } = new MessageChannel();
|
|
30
31
|
const promise = new Promise((resolve) => (port2.onmessage = (event) => resolve(event.data)));
|
|
31
32
|
port1.postMessage(value, options);
|
|
32
|
-
return promise;
|
|
33
|
+
return await promise;
|
|
33
34
|
}
|
|
34
35
|
export function valueOfType(value) {
|
|
35
36
|
return value;
|
|
36
37
|
}
|
|
37
38
|
export function flatten(array) {
|
|
38
|
-
return array.reduce((acc, item) => (
|
|
39
|
+
return array.reduce((acc, item) => (isArray(item) ? [...(acc), ...flatten(item)] : [...(acc), item]), []);
|
|
39
40
|
}
|
|
40
41
|
export function toError(obj) {
|
|
41
42
|
if (obj instanceof Error) {
|
package/utils/object/object.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type JsonPathInput } from '../../json-path/json-path.js';
|
|
2
|
-
import type { BaseType, FromEntries, ObjectLiteral, Optionalize, OptionalizeNull, PickBy, Record, SimplifyObject, UnionToIntersection } from '../../types/index.js';
|
|
3
|
-
export declare function hasOwnProperty<T extends
|
|
4
|
-
export declare function hasOwnProperty<T extends
|
|
2
|
+
import type { BaseType, Entries, FromEntries, ObjectLiteral, Optionalize, OptionalizeNull, PickBy, Record, SimplifyObject, UnionToIntersection } from '../../types/index.js';
|
|
3
|
+
export declare function hasOwnProperty<T extends ObjectLiteral, K extends keyof UnionToIntersection<T>>(obj: T, key: K): obj is Extract<T, Partial<Record<K>>>;
|
|
4
|
+
export declare function hasOwnProperty<T extends ObjectLiteral>(obj: T, key: keyof T): boolean;
|
|
5
5
|
/**
|
|
6
6
|
* Returns object entries including those with symbols keys (which Object.entries does not)
|
|
7
7
|
*/
|
|
8
|
-
export declare function objectEntries<T extends ObjectLiteral>(object: T):
|
|
8
|
+
export declare function objectEntries<T extends ObjectLiteral>(object: T): Entries<T>;
|
|
9
9
|
/**
|
|
10
10
|
* Returns object keys including symbols (which Object.keys does not)
|
|
11
11
|
*/
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
CREATE TABLE "test"."test" (
|
|
2
|
-
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
3
|
-
"title" text NOT NULL,
|
|
4
|
-
"content" text NOT NULL,
|
|
5
|
-
"tags" text NOT NULL,
|
|
6
|
-
"language" text NOT NULL
|
|
7
|
-
);
|
|
8
|
-
--> statement-breakpoint
|
|
9
|
-
CREATE INDEX "test_title_content_tags_idx" ON "test"."test" USING gin ((setweight(to_tsvector('simple', "title"), 'A') || setweight(to_tsvector('simple', "content"), 'B') || setweight(to_tsvector('simple', "tags"), 'C')));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
DROP INDEX "test"."test_title_content_tags_idx";--> statement-breakpoint
|
|
2
|
-
CREATE INDEX "test_title_content_tags_idx" ON "test"."test" USING gin ((setweight(to_tsvector('simple', "title"), 'A') || setweight(to_tsvector('simple', "content"), 'B') || setweight(to_tsvector('simple', "tags"), 'C')));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
DROP INDEX "test"."test_title_content_tags_idx";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ALTER TABLE "test"."test" ADD COLUMN "ftsv_asd" "tsvector" GENERATED ALWAYS AS ((setweight(to_tsvector('simple', "test"."test"."title"), 'A') || setweight(to_tsvector('simple', "test"."test"."content"), 'B') || setweight(to_tsvector('simple', "test"."test"."tags"), 'C'))) STORED;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE INDEX "ftsv_asd_gin" ON "test"."test" USING gin ("ftsv_asd");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE INDEX "ftst_asd_gist" ON "test"."test" USING gist (("title" || "content" || "tags"));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
DROP INDEX "test"."ftsv_asd_gin";--> statement-breakpoint
|
|
2
|
-
DROP INDEX "test"."ftst_asd_gist";--> statement-breakpoint
|
|
3
|
-
ALTER TABLE "test"."test" ADD COLUMN "fts_v_asd" "tsvector" GENERATED ALWAYS AS ((setweight(to_tsvector('simple', "test"."test"."title"), 'A') || setweight(to_tsvector('simple', "test"."test"."content"), 'B') || setweight(to_tsvector('simple', "test"."test"."tags"), 'C'))) STORED;--> statement-breakpoint
|
|
4
|
-
CREATE INDEX "fts_v_asd_gin" ON "test"."test" USING gin ("fts_v_asd");--> statement-breakpoint
|
|
5
|
-
CREATE INDEX "fts_t_asd_gist" ON "test"."test" USING gist (("title" || "content" || "tags"));--> statement-breakpoint
|
|
6
|
-
ALTER TABLE "test"."test" DROP COLUMN "ftsv_asd";
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "3949ca77-11a4-4ca4-a404-1529e02d058c",
|
|
3
|
-
"prevId": "5c221821-4273-489d-b533-2f49653ab8d1",
|
|
4
|
-
"version": "7",
|
|
5
|
-
"dialect": "postgresql",
|
|
6
|
-
"tables": {
|
|
7
|
-
"test.test": {
|
|
8
|
-
"name": "test",
|
|
9
|
-
"schema": "test",
|
|
10
|
-
"columns": {
|
|
11
|
-
"id": {
|
|
12
|
-
"name": "id",
|
|
13
|
-
"type": "uuid",
|
|
14
|
-
"primaryKey": true,
|
|
15
|
-
"notNull": true,
|
|
16
|
-
"default": "gen_random_uuid()"
|
|
17
|
-
},
|
|
18
|
-
"title": {
|
|
19
|
-
"name": "title",
|
|
20
|
-
"type": "text",
|
|
21
|
-
"primaryKey": false,
|
|
22
|
-
"notNull": true
|
|
23
|
-
},
|
|
24
|
-
"content": {
|
|
25
|
-
"name": "content",
|
|
26
|
-
"type": "text",
|
|
27
|
-
"primaryKey": false,
|
|
28
|
-
"notNull": true
|
|
29
|
-
},
|
|
30
|
-
"tags": {
|
|
31
|
-
"name": "tags",
|
|
32
|
-
"type": "text",
|
|
33
|
-
"primaryKey": false,
|
|
34
|
-
"notNull": true
|
|
35
|
-
},
|
|
36
|
-
"language": {
|
|
37
|
-
"name": "language",
|
|
38
|
-
"type": "text",
|
|
39
|
-
"primaryKey": false,
|
|
40
|
-
"notNull": true
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"indexes": {
|
|
44
|
-
"test_title_content_tags_idx": {
|
|
45
|
-
"name": "test_title_content_tags_idx",
|
|
46
|
-
"columns": [
|
|
47
|
-
{
|
|
48
|
-
"expression": "(setweight(to_tsvector('simple', \"title\"), 'A') || setweight(to_tsvector('simple', \"content\"), 'B') || setweight(to_tsvector('simple', \"tags\"), 'C'))",
|
|
49
|
-
"asc": true,
|
|
50
|
-
"isExpression": true,
|
|
51
|
-
"nulls": "last"
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"isUnique": false,
|
|
55
|
-
"concurrently": false,
|
|
56
|
-
"method": "gin",
|
|
57
|
-
"with": {}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"foreignKeys": {},
|
|
61
|
-
"compositePrimaryKeys": {},
|
|
62
|
-
"uniqueConstraints": {},
|
|
63
|
-
"policies": {},
|
|
64
|
-
"checkConstraints": {},
|
|
65
|
-
"isRLSEnabled": false
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"enums": {},
|
|
69
|
-
"schemas": {},
|
|
70
|
-
"sequences": {},
|
|
71
|
-
"roles": {},
|
|
72
|
-
"policies": {},
|
|
73
|
-
"views": {},
|
|
74
|
-
"_meta": {
|
|
75
|
-
"columns": {},
|
|
76
|
-
"schemas": {},
|
|
77
|
-
"tables": {}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "c8eced2f-44d3-46b3-aafa-e8a775549cd0",
|
|
3
|
-
"prevId": "3949ca77-11a4-4ca4-a404-1529e02d058c",
|
|
4
|
-
"version": "7",
|
|
5
|
-
"dialect": "postgresql",
|
|
6
|
-
"tables": {
|
|
7
|
-
"test.test": {
|
|
8
|
-
"name": "test",
|
|
9
|
-
"schema": "test",
|
|
10
|
-
"columns": {
|
|
11
|
-
"id": {
|
|
12
|
-
"name": "id",
|
|
13
|
-
"type": "uuid",
|
|
14
|
-
"primaryKey": true,
|
|
15
|
-
"notNull": true,
|
|
16
|
-
"default": "gen_random_uuid()"
|
|
17
|
-
},
|
|
18
|
-
"title": {
|
|
19
|
-
"name": "title",
|
|
20
|
-
"type": "text",
|
|
21
|
-
"primaryKey": false,
|
|
22
|
-
"notNull": true
|
|
23
|
-
},
|
|
24
|
-
"content": {
|
|
25
|
-
"name": "content",
|
|
26
|
-
"type": "text",
|
|
27
|
-
"primaryKey": false,
|
|
28
|
-
"notNull": true
|
|
29
|
-
},
|
|
30
|
-
"tags": {
|
|
31
|
-
"name": "tags",
|
|
32
|
-
"type": "text",
|
|
33
|
-
"primaryKey": false,
|
|
34
|
-
"notNull": true
|
|
35
|
-
},
|
|
36
|
-
"language": {
|
|
37
|
-
"name": "language",
|
|
38
|
-
"type": "text",
|
|
39
|
-
"primaryKey": false,
|
|
40
|
-
"notNull": true
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"indexes": {},
|
|
44
|
-
"foreignKeys": {},
|
|
45
|
-
"compositePrimaryKeys": {},
|
|
46
|
-
"uniqueConstraints": {},
|
|
47
|
-
"policies": {},
|
|
48
|
-
"checkConstraints": {},
|
|
49
|
-
"isRLSEnabled": false
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"enums": {},
|
|
53
|
-
"schemas": {},
|
|
54
|
-
"sequences": {},
|
|
55
|
-
"roles": {},
|
|
56
|
-
"policies": {},
|
|
57
|
-
"views": {},
|
|
58
|
-
"_meta": {
|
|
59
|
-
"columns": {},
|
|
60
|
-
"schemas": {},
|
|
61
|
-
"tables": {}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "febb0102-cd99-43ee-8458-f25dc50e5264",
|
|
3
|
-
"prevId": "c8eced2f-44d3-46b3-aafa-e8a775549cd0",
|
|
4
|
-
"version": "7",
|
|
5
|
-
"dialect": "postgresql",
|
|
6
|
-
"tables": {
|
|
7
|
-
"test.test": {
|
|
8
|
-
"name": "test",
|
|
9
|
-
"schema": "test",
|
|
10
|
-
"columns": {
|
|
11
|
-
"id": {
|
|
12
|
-
"name": "id",
|
|
13
|
-
"type": "uuid",
|
|
14
|
-
"primaryKey": true,
|
|
15
|
-
"notNull": true,
|
|
16
|
-
"default": "gen_random_uuid()"
|
|
17
|
-
},
|
|
18
|
-
"title": {
|
|
19
|
-
"name": "title",
|
|
20
|
-
"type": "text",
|
|
21
|
-
"primaryKey": false,
|
|
22
|
-
"notNull": true
|
|
23
|
-
},
|
|
24
|
-
"content": {
|
|
25
|
-
"name": "content",
|
|
26
|
-
"type": "text",
|
|
27
|
-
"primaryKey": false,
|
|
28
|
-
"notNull": true
|
|
29
|
-
},
|
|
30
|
-
"tags": {
|
|
31
|
-
"name": "tags",
|
|
32
|
-
"type": "text",
|
|
33
|
-
"primaryKey": false,
|
|
34
|
-
"notNull": true
|
|
35
|
-
},
|
|
36
|
-
"language": {
|
|
37
|
-
"name": "language",
|
|
38
|
-
"type": "text",
|
|
39
|
-
"primaryKey": false,
|
|
40
|
-
"notNull": true
|
|
41
|
-
},
|
|
42
|
-
"ftsv_asd": {
|
|
43
|
-
"name": "ftsv_asd",
|
|
44
|
-
"type": "tsvector",
|
|
45
|
-
"primaryKey": false,
|
|
46
|
-
"notNull": false,
|
|
47
|
-
"generated": {
|
|
48
|
-
"as": "(setweight(to_tsvector('simple', \"test\".\"test\".\"title\"), 'A') || setweight(to_tsvector('simple', \"test\".\"test\".\"content\"), 'B') || setweight(to_tsvector('simple', \"test\".\"test\".\"tags\"), 'C'))",
|
|
49
|
-
"type": "stored"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"indexes": {},
|
|
54
|
-
"foreignKeys": {},
|
|
55
|
-
"compositePrimaryKeys": {},
|
|
56
|
-
"uniqueConstraints": {},
|
|
57
|
-
"policies": {},
|
|
58
|
-
"checkConstraints": {},
|
|
59
|
-
"isRLSEnabled": false
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"enums": {},
|
|
63
|
-
"schemas": {},
|
|
64
|
-
"sequences": {},
|
|
65
|
-
"roles": {},
|
|
66
|
-
"policies": {},
|
|
67
|
-
"views": {},
|
|
68
|
-
"_meta": {
|
|
69
|
-
"columns": {},
|
|
70
|
-
"schemas": {},
|
|
71
|
-
"tables": {}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "40cebc5a-7b84-40ff-ba11-c878018e6488",
|
|
3
|
-
"prevId": "febb0102-cd99-43ee-8458-f25dc50e5264",
|
|
4
|
-
"version": "7",
|
|
5
|
-
"dialect": "postgresql",
|
|
6
|
-
"tables": {
|
|
7
|
-
"test.test": {
|
|
8
|
-
"name": "test",
|
|
9
|
-
"schema": "test",
|
|
10
|
-
"columns": {
|
|
11
|
-
"id": {
|
|
12
|
-
"name": "id",
|
|
13
|
-
"type": "uuid",
|
|
14
|
-
"primaryKey": true,
|
|
15
|
-
"notNull": true,
|
|
16
|
-
"default": "gen_random_uuid()"
|
|
17
|
-
},
|
|
18
|
-
"title": {
|
|
19
|
-
"name": "title",
|
|
20
|
-
"type": "text",
|
|
21
|
-
"primaryKey": false,
|
|
22
|
-
"notNull": true
|
|
23
|
-
},
|
|
24
|
-
"content": {
|
|
25
|
-
"name": "content",
|
|
26
|
-
"type": "text",
|
|
27
|
-
"primaryKey": false,
|
|
28
|
-
"notNull": true
|
|
29
|
-
},
|
|
30
|
-
"tags": {
|
|
31
|
-
"name": "tags",
|
|
32
|
-
"type": "text",
|
|
33
|
-
"primaryKey": false,
|
|
34
|
-
"notNull": true
|
|
35
|
-
},
|
|
36
|
-
"language": {
|
|
37
|
-
"name": "language",
|
|
38
|
-
"type": "text",
|
|
39
|
-
"primaryKey": false,
|
|
40
|
-
"notNull": true
|
|
41
|
-
},
|
|
42
|
-
"ftsv_asd": {
|
|
43
|
-
"name": "ftsv_asd",
|
|
44
|
-
"type": "tsvector",
|
|
45
|
-
"primaryKey": false,
|
|
46
|
-
"notNull": false,
|
|
47
|
-
"generated": {
|
|
48
|
-
"as": "(setweight(to_tsvector('simple', \"test\".\"test\".\"title\"), 'A') || setweight(to_tsvector('simple', \"test\".\"test\".\"content\"), 'B') || setweight(to_tsvector('simple', \"test\".\"test\".\"tags\"), 'C'))",
|
|
49
|
-
"type": "stored"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"indexes": {
|
|
54
|
-
"ftsv_asd_gin": {
|
|
55
|
-
"name": "ftsv_asd_gin",
|
|
56
|
-
"columns": [
|
|
57
|
-
{
|
|
58
|
-
"expression": "ftsv_asd",
|
|
59
|
-
"isExpression": false,
|
|
60
|
-
"asc": true,
|
|
61
|
-
"nulls": "last"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"isUnique": false,
|
|
65
|
-
"concurrently": false,
|
|
66
|
-
"method": "gin",
|
|
67
|
-
"with": {}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"foreignKeys": {},
|
|
71
|
-
"compositePrimaryKeys": {},
|
|
72
|
-
"uniqueConstraints": {},
|
|
73
|
-
"policies": {},
|
|
74
|
-
"checkConstraints": {},
|
|
75
|
-
"isRLSEnabled": false
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"enums": {},
|
|
79
|
-
"schemas": {},
|
|
80
|
-
"sequences": {},
|
|
81
|
-
"roles": {},
|
|
82
|
-
"policies": {},
|
|
83
|
-
"views": {},
|
|
84
|
-
"_meta": {
|
|
85
|
-
"columns": {},
|
|
86
|
-
"schemas": {},
|
|
87
|
-
"tables": {}
|
|
88
|
-
}
|
|
89
|
-
}
|