mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
Fixing persons metadata sql field charset
This commit is contained in:
parent
a5954f1705
commit
d02e3cbd33
@ -52,7 +52,9 @@ export class MediaMetadataEntity implements MediaMetadata {
|
|||||||
@OneToMany(type => FaceRegionEntry, faceRegion => faceRegion.media)
|
@OneToMany(type => FaceRegionEntry, faceRegion => faceRegion.media)
|
||||||
faces: FaceRegionEntry[];
|
faces: FaceRegionEntry[];
|
||||||
|
|
||||||
@Column('simple-array', {select: false, nullable: true})
|
@Column({type: 'simple-array', select: false, nullable: true,
|
||||||
|
charset: columnCharsetCS.charset,
|
||||||
|
collation: columnCharsetCS.collation})
|
||||||
persons: string[]; // Caches the list of persons. Only used for searching
|
persons: string[]; // Caches the list of persons. Only used for searching
|
||||||
|
|
||||||
@Column('int', {unsigned: true})
|
@Column('int', {unsigned: true})
|
||||||
|
@ -121,7 +121,6 @@ export namespace SearchQueryDTO {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const parse = (str: string, implicitOR = true): SearchQueryDTO => {
|
export const parse = (str: string, implicitOR = true): SearchQueryDTO => {
|
||||||
console.log('parsing: ' + str);
|
|
||||||
str = str.replace(/\s\s+/g, ' ') // remove double spaces
|
str = str.replace(/\s\s+/g, ' ') // remove double spaces
|
||||||
.replace(/:\s+/g, ':').replace(/\)(?=\S)/g, ') ').trim();
|
.replace(/:\s+/g, ':').replace(/\)(?=\S)/g, ') ').trim();
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import {MediaDTO} from '../../../../../src/common/entities/MediaDTO';
|
|||||||
// to help WebStorm to handle the test cases
|
// to help WebStorm to handle the test cases
|
||||||
declare let describe: any;
|
declare let describe: any;
|
||||||
declare const after: any;
|
declare const after: any;
|
||||||
|
declare const before: any;
|
||||||
declare const it: any;
|
declare const it: any;
|
||||||
|
|
||||||
|
|
||||||
@ -54,7 +55,7 @@ describe('PersonManager', (sqlHelper: SQLTestHelper) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
before(async () => {
|
||||||
await setUpSqlDB();
|
await setUpSqlDB();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user