chore(server): time bucket sql (#6156)
This commit is contained in:
@@ -674,6 +674,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
);
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [{ size: TimeBucketSize.MONTH }] })
|
||||
getTimeBuckets(options: TimeBucketOptions): Promise<TimeBucketItem[]> {
|
||||
const truncated = dateTrunc(options);
|
||||
return this.getBuilder(options)
|
||||
@@ -684,6 +685,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
.getRawMany();
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [DummyValue.TIME_BUCKET, { size: TimeBucketSize.MONTH }] })
|
||||
getTimeBucket(timeBucket: string, options: TimeBucketOptions): Promise<AssetEntity[]> {
|
||||
const truncated = dateTrunc(options);
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user