refactor(server): use kysely (#12857)

This commit is contained in:
Mert
2025-01-09 11:15:41 -05:00
committed by GitHub
parent 1489d69f81
commit 2e12c46980
59 changed files with 2891 additions and 3289 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
import { AssetFaceEntity } from 'src/entities/asset-face.entity';
import { asVector } from 'src/utils/database';
import { Column, Entity, Index, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
@Entity('face_search', { synchronize: false })
@@ -15,7 +14,7 @@ export class FaceSearchEntity {
@Column({
type: 'float4',
array: true,
transformer: { from: (v) => JSON.parse(v), to: (v) => asVector(v) },
transformer: { from: JSON.parse, to: (v) => `[${v}]` },
})
embedding!: number[];
}