mirror of
https://github.com/immich-app/immich.git
synced 2024-12-27 10:58:13 +02:00
b49b10141e
Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2903 lines
81 KiB
Dart
Generated
2903 lines
81 KiB
Dart
Generated
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'asset.dart';
|
|
|
|
// **************************************************************************
|
|
// IsarCollectionGenerator
|
|
// **************************************************************************
|
|
|
|
// coverage:ignore-file
|
|
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
|
|
|
|
extension GetAssetCollection on Isar {
|
|
IsarCollection<Asset> get assets => this.collection();
|
|
}
|
|
|
|
const AssetSchema = CollectionSchema(
|
|
name: r'Asset',
|
|
id: -2933289051367723566,
|
|
properties: {
|
|
r'checksum': PropertySchema(
|
|
id: 0,
|
|
name: r'checksum',
|
|
type: IsarType.string,
|
|
),
|
|
r'durationInSeconds': PropertySchema(
|
|
id: 1,
|
|
name: r'durationInSeconds',
|
|
type: IsarType.long,
|
|
),
|
|
r'fileCreatedAt': PropertySchema(
|
|
id: 2,
|
|
name: r'fileCreatedAt',
|
|
type: IsarType.dateTime,
|
|
),
|
|
r'fileModifiedAt': PropertySchema(
|
|
id: 3,
|
|
name: r'fileModifiedAt',
|
|
type: IsarType.dateTime,
|
|
),
|
|
r'fileName': PropertySchema(
|
|
id: 4,
|
|
name: r'fileName',
|
|
type: IsarType.string,
|
|
),
|
|
r'height': PropertySchema(
|
|
id: 5,
|
|
name: r'height',
|
|
type: IsarType.int,
|
|
),
|
|
r'isArchived': PropertySchema(
|
|
id: 6,
|
|
name: r'isArchived',
|
|
type: IsarType.bool,
|
|
),
|
|
r'isFavorite': PropertySchema(
|
|
id: 7,
|
|
name: r'isFavorite',
|
|
type: IsarType.bool,
|
|
),
|
|
r'isTrashed': PropertySchema(
|
|
id: 8,
|
|
name: r'isTrashed',
|
|
type: IsarType.bool,
|
|
),
|
|
r'livePhotoVideoId': PropertySchema(
|
|
id: 9,
|
|
name: r'livePhotoVideoId',
|
|
type: IsarType.string,
|
|
),
|
|
r'localId': PropertySchema(
|
|
id: 10,
|
|
name: r'localId',
|
|
type: IsarType.string,
|
|
),
|
|
r'ownerId': PropertySchema(
|
|
id: 11,
|
|
name: r'ownerId',
|
|
type: IsarType.long,
|
|
),
|
|
r'remoteId': PropertySchema(
|
|
id: 12,
|
|
name: r'remoteId',
|
|
type: IsarType.string,
|
|
),
|
|
r'stackCount': PropertySchema(
|
|
id: 13,
|
|
name: r'stackCount',
|
|
type: IsarType.long,
|
|
),
|
|
r'stackParentId': PropertySchema(
|
|
id: 14,
|
|
name: r'stackParentId',
|
|
type: IsarType.string,
|
|
),
|
|
r'type': PropertySchema(
|
|
id: 15,
|
|
name: r'type',
|
|
type: IsarType.byte,
|
|
enumMap: _AssettypeEnumValueMap,
|
|
),
|
|
r'updatedAt': PropertySchema(
|
|
id: 16,
|
|
name: r'updatedAt',
|
|
type: IsarType.dateTime,
|
|
),
|
|
r'width': PropertySchema(
|
|
id: 17,
|
|
name: r'width',
|
|
type: IsarType.int,
|
|
)
|
|
},
|
|
estimateSize: _assetEstimateSize,
|
|
serialize: _assetSerialize,
|
|
deserialize: _assetDeserialize,
|
|
deserializeProp: _assetDeserializeProp,
|
|
idName: r'id',
|
|
indexes: {
|
|
r'remoteId': IndexSchema(
|
|
id: 6301175856541681032,
|
|
name: r'remoteId',
|
|
unique: false,
|
|
replace: false,
|
|
properties: [
|
|
IndexPropertySchema(
|
|
name: r'remoteId',
|
|
type: IndexType.hash,
|
|
caseSensitive: true,
|
|
)
|
|
],
|
|
),
|
|
r'localId': IndexSchema(
|
|
id: 1199848425898359622,
|
|
name: r'localId',
|
|
unique: false,
|
|
replace: false,
|
|
properties: [
|
|
IndexPropertySchema(
|
|
name: r'localId',
|
|
type: IndexType.hash,
|
|
caseSensitive: true,
|
|
)
|
|
],
|
|
),
|
|
r'ownerId_checksum': IndexSchema(
|
|
id: -3295822444433175883,
|
|
name: r'ownerId_checksum',
|
|
unique: true,
|
|
replace: false,
|
|
properties: [
|
|
IndexPropertySchema(
|
|
name: r'ownerId',
|
|
type: IndexType.value,
|
|
caseSensitive: false,
|
|
),
|
|
IndexPropertySchema(
|
|
name: r'checksum',
|
|
type: IndexType.hash,
|
|
caseSensitive: true,
|
|
)
|
|
],
|
|
)
|
|
},
|
|
links: {},
|
|
embeddedSchemas: {},
|
|
getId: _assetGetId,
|
|
getLinks: _assetGetLinks,
|
|
attach: _assetAttach,
|
|
version: '3.1.0+1',
|
|
);
|
|
|
|
int _assetEstimateSize(
|
|
Asset object,
|
|
List<int> offsets,
|
|
Map<Type, List<int>> allOffsets,
|
|
) {
|
|
var bytesCount = offsets.last;
|
|
bytesCount += 3 + object.checksum.length * 3;
|
|
bytesCount += 3 + object.fileName.length * 3;
|
|
{
|
|
final value = object.livePhotoVideoId;
|
|
if (value != null) {
|
|
bytesCount += 3 + value.length * 3;
|
|
}
|
|
}
|
|
{
|
|
final value = object.localId;
|
|
if (value != null) {
|
|
bytesCount += 3 + value.length * 3;
|
|
}
|
|
}
|
|
{
|
|
final value = object.remoteId;
|
|
if (value != null) {
|
|
bytesCount += 3 + value.length * 3;
|
|
}
|
|
}
|
|
{
|
|
final value = object.stackParentId;
|
|
if (value != null) {
|
|
bytesCount += 3 + value.length * 3;
|
|
}
|
|
}
|
|
return bytesCount;
|
|
}
|
|
|
|
void _assetSerialize(
|
|
Asset object,
|
|
IsarWriter writer,
|
|
List<int> offsets,
|
|
Map<Type, List<int>> allOffsets,
|
|
) {
|
|
writer.writeString(offsets[0], object.checksum);
|
|
writer.writeLong(offsets[1], object.durationInSeconds);
|
|
writer.writeDateTime(offsets[2], object.fileCreatedAt);
|
|
writer.writeDateTime(offsets[3], object.fileModifiedAt);
|
|
writer.writeString(offsets[4], object.fileName);
|
|
writer.writeInt(offsets[5], object.height);
|
|
writer.writeBool(offsets[6], object.isArchived);
|
|
writer.writeBool(offsets[7], object.isFavorite);
|
|
writer.writeBool(offsets[8], object.isTrashed);
|
|
writer.writeString(offsets[9], object.livePhotoVideoId);
|
|
writer.writeString(offsets[10], object.localId);
|
|
writer.writeLong(offsets[11], object.ownerId);
|
|
writer.writeString(offsets[12], object.remoteId);
|
|
writer.writeLong(offsets[13], object.stackCount);
|
|
writer.writeString(offsets[14], object.stackParentId);
|
|
writer.writeByte(offsets[15], object.type.index);
|
|
writer.writeDateTime(offsets[16], object.updatedAt);
|
|
writer.writeInt(offsets[17], object.width);
|
|
}
|
|
|
|
Asset _assetDeserialize(
|
|
Id id,
|
|
IsarReader reader,
|
|
List<int> offsets,
|
|
Map<Type, List<int>> allOffsets,
|
|
) {
|
|
final object = Asset(
|
|
checksum: reader.readString(offsets[0]),
|
|
durationInSeconds: reader.readLong(offsets[1]),
|
|
fileCreatedAt: reader.readDateTime(offsets[2]),
|
|
fileModifiedAt: reader.readDateTime(offsets[3]),
|
|
fileName: reader.readString(offsets[4]),
|
|
height: reader.readIntOrNull(offsets[5]),
|
|
id: id,
|
|
isArchived: reader.readBool(offsets[6]),
|
|
isFavorite: reader.readBool(offsets[7]),
|
|
isTrashed: reader.readBool(offsets[8]),
|
|
livePhotoVideoId: reader.readStringOrNull(offsets[9]),
|
|
localId: reader.readStringOrNull(offsets[10]),
|
|
ownerId: reader.readLong(offsets[11]),
|
|
remoteId: reader.readStringOrNull(offsets[12]),
|
|
stackCount: reader.readLongOrNull(offsets[13]),
|
|
stackParentId: reader.readStringOrNull(offsets[14]),
|
|
type: _AssettypeValueEnumMap[reader.readByteOrNull(offsets[15])] ??
|
|
AssetType.other,
|
|
updatedAt: reader.readDateTime(offsets[16]),
|
|
width: reader.readIntOrNull(offsets[17]),
|
|
);
|
|
return object;
|
|
}
|
|
|
|
P _assetDeserializeProp<P>(
|
|
IsarReader reader,
|
|
int propertyId,
|
|
int offset,
|
|
Map<Type, List<int>> allOffsets,
|
|
) {
|
|
switch (propertyId) {
|
|
case 0:
|
|
return (reader.readString(offset)) as P;
|
|
case 1:
|
|
return (reader.readLong(offset)) as P;
|
|
case 2:
|
|
return (reader.readDateTime(offset)) as P;
|
|
case 3:
|
|
return (reader.readDateTime(offset)) as P;
|
|
case 4:
|
|
return (reader.readString(offset)) as P;
|
|
case 5:
|
|
return (reader.readIntOrNull(offset)) as P;
|
|
case 6:
|
|
return (reader.readBool(offset)) as P;
|
|
case 7:
|
|
return (reader.readBool(offset)) as P;
|
|
case 8:
|
|
return (reader.readBool(offset)) as P;
|
|
case 9:
|
|
return (reader.readStringOrNull(offset)) as P;
|
|
case 10:
|
|
return (reader.readStringOrNull(offset)) as P;
|
|
case 11:
|
|
return (reader.readLong(offset)) as P;
|
|
case 12:
|
|
return (reader.readStringOrNull(offset)) as P;
|
|
case 13:
|
|
return (reader.readLongOrNull(offset)) as P;
|
|
case 14:
|
|
return (reader.readStringOrNull(offset)) as P;
|
|
case 15:
|
|
return (_AssettypeValueEnumMap[reader.readByteOrNull(offset)] ??
|
|
AssetType.other) as P;
|
|
case 16:
|
|
return (reader.readDateTime(offset)) as P;
|
|
case 17:
|
|
return (reader.readIntOrNull(offset)) as P;
|
|
default:
|
|
throw IsarError('Unknown property with id $propertyId');
|
|
}
|
|
}
|
|
|
|
const _AssettypeEnumValueMap = {
|
|
'other': 0,
|
|
'image': 1,
|
|
'video': 2,
|
|
'audio': 3,
|
|
};
|
|
const _AssettypeValueEnumMap = {
|
|
0: AssetType.other,
|
|
1: AssetType.image,
|
|
2: AssetType.video,
|
|
3: AssetType.audio,
|
|
};
|
|
|
|
Id _assetGetId(Asset object) {
|
|
return object.id;
|
|
}
|
|
|
|
List<IsarLinkBase<dynamic>> _assetGetLinks(Asset object) {
|
|
return [];
|
|
}
|
|
|
|
void _assetAttach(IsarCollection<dynamic> col, Id id, Asset object) {
|
|
object.id = id;
|
|
}
|
|
|
|
extension AssetByIndex on IsarCollection<Asset> {
|
|
Future<Asset?> getByOwnerIdChecksum(int ownerId, String checksum) {
|
|
return getByIndex(r'ownerId_checksum', [ownerId, checksum]);
|
|
}
|
|
|
|
Asset? getByOwnerIdChecksumSync(int ownerId, String checksum) {
|
|
return getByIndexSync(r'ownerId_checksum', [ownerId, checksum]);
|
|
}
|
|
|
|
Future<bool> deleteByOwnerIdChecksum(int ownerId, String checksum) {
|
|
return deleteByIndex(r'ownerId_checksum', [ownerId, checksum]);
|
|
}
|
|
|
|
bool deleteByOwnerIdChecksumSync(int ownerId, String checksum) {
|
|
return deleteByIndexSync(r'ownerId_checksum', [ownerId, checksum]);
|
|
}
|
|
|
|
Future<List<Asset?>> getAllByOwnerIdChecksum(
|
|
List<int> ownerIdValues, List<String> checksumValues) {
|
|
final len = ownerIdValues.length;
|
|
assert(checksumValues.length == len,
|
|
'All index values must have the same length');
|
|
final values = <List<dynamic>>[];
|
|
for (var i = 0; i < len; i++) {
|
|
values.add([ownerIdValues[i], checksumValues[i]]);
|
|
}
|
|
|
|
return getAllByIndex(r'ownerId_checksum', values);
|
|
}
|
|
|
|
List<Asset?> getAllByOwnerIdChecksumSync(
|
|
List<int> ownerIdValues, List<String> checksumValues) {
|
|
final len = ownerIdValues.length;
|
|
assert(checksumValues.length == len,
|
|
'All index values must have the same length');
|
|
final values = <List<dynamic>>[];
|
|
for (var i = 0; i < len; i++) {
|
|
values.add([ownerIdValues[i], checksumValues[i]]);
|
|
}
|
|
|
|
return getAllByIndexSync(r'ownerId_checksum', values);
|
|
}
|
|
|
|
Future<int> deleteAllByOwnerIdChecksum(
|
|
List<int> ownerIdValues, List<String> checksumValues) {
|
|
final len = ownerIdValues.length;
|
|
assert(checksumValues.length == len,
|
|
'All index values must have the same length');
|
|
final values = <List<dynamic>>[];
|
|
for (var i = 0; i < len; i++) {
|
|
values.add([ownerIdValues[i], checksumValues[i]]);
|
|
}
|
|
|
|
return deleteAllByIndex(r'ownerId_checksum', values);
|
|
}
|
|
|
|
int deleteAllByOwnerIdChecksumSync(
|
|
List<int> ownerIdValues, List<String> checksumValues) {
|
|
final len = ownerIdValues.length;
|
|
assert(checksumValues.length == len,
|
|
'All index values must have the same length');
|
|
final values = <List<dynamic>>[];
|
|
for (var i = 0; i < len; i++) {
|
|
values.add([ownerIdValues[i], checksumValues[i]]);
|
|
}
|
|
|
|
return deleteAllByIndexSync(r'ownerId_checksum', values);
|
|
}
|
|
|
|
Future<Id> putByOwnerIdChecksum(Asset object) {
|
|
return putByIndex(r'ownerId_checksum', object);
|
|
}
|
|
|
|
Id putByOwnerIdChecksumSync(Asset object, {bool saveLinks = true}) {
|
|
return putByIndexSync(r'ownerId_checksum', object, saveLinks: saveLinks);
|
|
}
|
|
|
|
Future<List<Id>> putAllByOwnerIdChecksum(List<Asset> objects) {
|
|
return putAllByIndex(r'ownerId_checksum', objects);
|
|
}
|
|
|
|
List<Id> putAllByOwnerIdChecksumSync(List<Asset> objects,
|
|
{bool saveLinks = true}) {
|
|
return putAllByIndexSync(r'ownerId_checksum', objects,
|
|
saveLinks: saveLinks);
|
|
}
|
|
}
|
|
|
|
extension AssetQueryWhereSort on QueryBuilder<Asset, Asset, QWhere> {
|
|
QueryBuilder<Asset, Asset, QAfterWhere> anyId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(const IdWhereClause.any());
|
|
});
|
|
}
|
|
}
|
|
|
|
extension AssetQueryWhere on QueryBuilder<Asset, Asset, QWhereClause> {
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> idEqualTo(Id id) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IdWhereClause.between(
|
|
lower: id,
|
|
upper: id,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> idNotEqualTo(Id id) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
if (query.whereSort == Sort.asc) {
|
|
return query
|
|
.addWhereClause(
|
|
IdWhereClause.lessThan(upper: id, includeUpper: false),
|
|
)
|
|
.addWhereClause(
|
|
IdWhereClause.greaterThan(lower: id, includeLower: false),
|
|
);
|
|
} else {
|
|
return query
|
|
.addWhereClause(
|
|
IdWhereClause.greaterThan(lower: id, includeLower: false),
|
|
)
|
|
.addWhereClause(
|
|
IdWhereClause.lessThan(upper: id, includeUpper: false),
|
|
);
|
|
}
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> idGreaterThan(Id id,
|
|
{bool include = false}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(
|
|
IdWhereClause.greaterThan(lower: id, includeLower: include),
|
|
);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> idLessThan(Id id,
|
|
{bool include = false}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(
|
|
IdWhereClause.lessThan(upper: id, includeUpper: include),
|
|
);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> idBetween(
|
|
Id lowerId,
|
|
Id upperId, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IdWhereClause.between(
|
|
lower: lowerId,
|
|
includeLower: includeLower,
|
|
upper: upperId,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> remoteIdIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.equalTo(
|
|
indexName: r'remoteId',
|
|
value: [null],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> remoteIdIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'remoteId',
|
|
lower: [null],
|
|
includeLower: false,
|
|
upper: [],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> remoteIdEqualTo(
|
|
String? remoteId) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.equalTo(
|
|
indexName: r'remoteId',
|
|
value: [remoteId],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> remoteIdNotEqualTo(
|
|
String? remoteId) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
if (query.whereSort == Sort.asc) {
|
|
return query
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'remoteId',
|
|
lower: [],
|
|
upper: [remoteId],
|
|
includeUpper: false,
|
|
))
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'remoteId',
|
|
lower: [remoteId],
|
|
includeLower: false,
|
|
upper: [],
|
|
));
|
|
} else {
|
|
return query
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'remoteId',
|
|
lower: [remoteId],
|
|
includeLower: false,
|
|
upper: [],
|
|
))
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'remoteId',
|
|
lower: [],
|
|
upper: [remoteId],
|
|
includeUpper: false,
|
|
));
|
|
}
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> localIdIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.equalTo(
|
|
indexName: r'localId',
|
|
value: [null],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> localIdIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'localId',
|
|
lower: [null],
|
|
includeLower: false,
|
|
upper: [],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> localIdEqualTo(
|
|
String? localId) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.equalTo(
|
|
indexName: r'localId',
|
|
value: [localId],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> localIdNotEqualTo(
|
|
String? localId) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
if (query.whereSort == Sort.asc) {
|
|
return query
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'localId',
|
|
lower: [],
|
|
upper: [localId],
|
|
includeUpper: false,
|
|
))
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'localId',
|
|
lower: [localId],
|
|
includeLower: false,
|
|
upper: [],
|
|
));
|
|
} else {
|
|
return query
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'localId',
|
|
lower: [localId],
|
|
includeLower: false,
|
|
upper: [],
|
|
))
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'localId',
|
|
lower: [],
|
|
upper: [localId],
|
|
includeUpper: false,
|
|
));
|
|
}
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> ownerIdEqualToAnyChecksum(
|
|
int ownerId) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.equalTo(
|
|
indexName: r'ownerId_checksum',
|
|
value: [ownerId],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> ownerIdNotEqualToAnyChecksum(
|
|
int ownerId) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
if (query.whereSort == Sort.asc) {
|
|
return query
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [],
|
|
upper: [ownerId],
|
|
includeUpper: false,
|
|
))
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [ownerId],
|
|
includeLower: false,
|
|
upper: [],
|
|
));
|
|
} else {
|
|
return query
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [ownerId],
|
|
includeLower: false,
|
|
upper: [],
|
|
))
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [],
|
|
upper: [ownerId],
|
|
includeUpper: false,
|
|
));
|
|
}
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> ownerIdGreaterThanAnyChecksum(
|
|
int ownerId, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [ownerId],
|
|
includeLower: include,
|
|
upper: [],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> ownerIdLessThanAnyChecksum(
|
|
int ownerId, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [],
|
|
upper: [ownerId],
|
|
includeUpper: include,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> ownerIdBetweenAnyChecksum(
|
|
int lowerOwnerId,
|
|
int upperOwnerId, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [lowerOwnerId],
|
|
includeLower: includeLower,
|
|
upper: [upperOwnerId],
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause> ownerIdChecksumEqualTo(
|
|
int ownerId, String checksum) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IndexWhereClause.equalTo(
|
|
indexName: r'ownerId_checksum',
|
|
value: [ownerId, checksum],
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterWhereClause>
|
|
ownerIdEqualToChecksumNotEqualTo(int ownerId, String checksum) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
if (query.whereSort == Sort.asc) {
|
|
return query
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [ownerId],
|
|
upper: [ownerId, checksum],
|
|
includeUpper: false,
|
|
))
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [ownerId, checksum],
|
|
includeLower: false,
|
|
upper: [ownerId],
|
|
));
|
|
} else {
|
|
return query
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [ownerId, checksum],
|
|
includeLower: false,
|
|
upper: [ownerId],
|
|
))
|
|
.addWhereClause(IndexWhereClause.between(
|
|
indexName: r'ownerId_checksum',
|
|
lower: [ownerId],
|
|
upper: [ownerId, checksum],
|
|
includeUpper: false,
|
|
));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
extension AssetQueryFilter on QueryBuilder<Asset, Asset, QFilterCondition> {
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumEqualTo(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'checksum',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumGreaterThan(
|
|
String value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'checksum',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumLessThan(
|
|
String value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'checksum',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumBetween(
|
|
String lower,
|
|
String upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'checksum',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumStartsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.startsWith(
|
|
property: r'checksum',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumEndsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.endsWith(
|
|
property: r'checksum',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumContains(
|
|
String value,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.contains(
|
|
property: r'checksum',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumMatches(
|
|
String pattern,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.matches(
|
|
property: r'checksum',
|
|
wildcard: pattern,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumIsEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'checksum',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> checksumIsNotEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
property: r'checksum',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> durationInSecondsEqualTo(
|
|
int value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'durationInSeconds',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition>
|
|
durationInSecondsGreaterThan(
|
|
int value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'durationInSeconds',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> durationInSecondsLessThan(
|
|
int value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'durationInSeconds',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> durationInSecondsBetween(
|
|
int lower,
|
|
int upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'durationInSeconds',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileCreatedAtEqualTo(
|
|
DateTime value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'fileCreatedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileCreatedAtGreaterThan(
|
|
DateTime value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'fileCreatedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileCreatedAtLessThan(
|
|
DateTime value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'fileCreatedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileCreatedAtBetween(
|
|
DateTime lower,
|
|
DateTime upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'fileCreatedAt',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileModifiedAtEqualTo(
|
|
DateTime value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'fileModifiedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileModifiedAtGreaterThan(
|
|
DateTime value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'fileModifiedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileModifiedAtLessThan(
|
|
DateTime value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'fileModifiedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileModifiedAtBetween(
|
|
DateTime lower,
|
|
DateTime upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'fileModifiedAt',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameEqualTo(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'fileName',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameGreaterThan(
|
|
String value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'fileName',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameLessThan(
|
|
String value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'fileName',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameBetween(
|
|
String lower,
|
|
String upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'fileName',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameStartsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.startsWith(
|
|
property: r'fileName',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameEndsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.endsWith(
|
|
property: r'fileName',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameContains(
|
|
String value,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.contains(
|
|
property: r'fileName',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameMatches(
|
|
String pattern,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.matches(
|
|
property: r'fileName',
|
|
wildcard: pattern,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameIsEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'fileName',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> fileNameIsNotEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
property: r'fileName',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> heightIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNull(
|
|
property: r'height',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> heightIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNotNull(
|
|
property: r'height',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> heightEqualTo(int? value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'height',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> heightGreaterThan(
|
|
int? value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'height',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> heightLessThan(
|
|
int? value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'height',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> heightBetween(
|
|
int? lower,
|
|
int? upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'height',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> idEqualTo(Id value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'id',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> idGreaterThan(
|
|
Id value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'id',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> idLessThan(
|
|
Id value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'id',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> idBetween(
|
|
Id lower,
|
|
Id upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'id',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> isArchivedEqualTo(
|
|
bool value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'isArchived',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> isFavoriteEqualTo(
|
|
bool value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'isFavorite',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> isTrashedEqualTo(
|
|
bool value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'isTrashed',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNull(
|
|
property: r'livePhotoVideoId',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition>
|
|
livePhotoVideoIdIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNotNull(
|
|
property: r'livePhotoVideoId',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdEqualTo(
|
|
String? value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'livePhotoVideoId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdGreaterThan(
|
|
String? value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'livePhotoVideoId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdLessThan(
|
|
String? value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'livePhotoVideoId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdBetween(
|
|
String? lower,
|
|
String? upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'livePhotoVideoId',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdStartsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.startsWith(
|
|
property: r'livePhotoVideoId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdEndsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.endsWith(
|
|
property: r'livePhotoVideoId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdContains(
|
|
String value,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.contains(
|
|
property: r'livePhotoVideoId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdMatches(
|
|
String pattern,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.matches(
|
|
property: r'livePhotoVideoId',
|
|
wildcard: pattern,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> livePhotoVideoIdIsEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'livePhotoVideoId',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition>
|
|
livePhotoVideoIdIsNotEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
property: r'livePhotoVideoId',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNull(
|
|
property: r'localId',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNotNull(
|
|
property: r'localId',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdEqualTo(
|
|
String? value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'localId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdGreaterThan(
|
|
String? value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'localId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdLessThan(
|
|
String? value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'localId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdBetween(
|
|
String? lower,
|
|
String? upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'localId',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdStartsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.startsWith(
|
|
property: r'localId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdEndsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.endsWith(
|
|
property: r'localId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdContains(
|
|
String value,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.contains(
|
|
property: r'localId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdMatches(
|
|
String pattern,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.matches(
|
|
property: r'localId',
|
|
wildcard: pattern,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdIsEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'localId',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> localIdIsNotEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
property: r'localId',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> ownerIdEqualTo(int value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'ownerId',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> ownerIdGreaterThan(
|
|
int value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'ownerId',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> ownerIdLessThan(
|
|
int value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'ownerId',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> ownerIdBetween(
|
|
int lower,
|
|
int upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'ownerId',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNull(
|
|
property: r'remoteId',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNotNull(
|
|
property: r'remoteId',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdEqualTo(
|
|
String? value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'remoteId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdGreaterThan(
|
|
String? value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'remoteId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdLessThan(
|
|
String? value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'remoteId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdBetween(
|
|
String? lower,
|
|
String? upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'remoteId',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdStartsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.startsWith(
|
|
property: r'remoteId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdEndsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.endsWith(
|
|
property: r'remoteId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdContains(
|
|
String value,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.contains(
|
|
property: r'remoteId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdMatches(
|
|
String pattern,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.matches(
|
|
property: r'remoteId',
|
|
wildcard: pattern,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdIsEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'remoteId',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> remoteIdIsNotEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
property: r'remoteId',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackCountIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNull(
|
|
property: r'stackCount',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackCountIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNotNull(
|
|
property: r'stackCount',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackCountEqualTo(
|
|
int? value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'stackCount',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackCountGreaterThan(
|
|
int? value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'stackCount',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackCountLessThan(
|
|
int? value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'stackCount',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackCountBetween(
|
|
int? lower,
|
|
int? upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'stackCount',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNull(
|
|
property: r'stackParentId',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNotNull(
|
|
property: r'stackParentId',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdEqualTo(
|
|
String? value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'stackParentId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdGreaterThan(
|
|
String? value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'stackParentId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdLessThan(
|
|
String? value, {
|
|
bool include = false,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'stackParentId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdBetween(
|
|
String? lower,
|
|
String? upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'stackParentId',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdStartsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.startsWith(
|
|
property: r'stackParentId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdEndsWith(
|
|
String value, {
|
|
bool caseSensitive = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.endsWith(
|
|
property: r'stackParentId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdContains(
|
|
String value,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.contains(
|
|
property: r'stackParentId',
|
|
value: value,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdMatches(
|
|
String pattern,
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.matches(
|
|
property: r'stackParentId',
|
|
wildcard: pattern,
|
|
caseSensitive: caseSensitive,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdIsEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'stackParentId',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> stackParentIdIsNotEmpty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
property: r'stackParentId',
|
|
value: '',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> typeEqualTo(
|
|
AssetType value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'type',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> typeGreaterThan(
|
|
AssetType value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'type',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> typeLessThan(
|
|
AssetType value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'type',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> typeBetween(
|
|
AssetType lower,
|
|
AssetType upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'type',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> updatedAtEqualTo(
|
|
DateTime value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'updatedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> updatedAtGreaterThan(
|
|
DateTime value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'updatedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> updatedAtLessThan(
|
|
DateTime value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'updatedAt',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> updatedAtBetween(
|
|
DateTime lower,
|
|
DateTime upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'updatedAt',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> widthIsNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNull(
|
|
property: r'width',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> widthIsNotNull() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(const FilterCondition.isNotNull(
|
|
property: r'width',
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> widthEqualTo(int? value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'width',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> widthGreaterThan(
|
|
int? value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'width',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> widthLessThan(
|
|
int? value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'width',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterFilterCondition> widthBetween(
|
|
int? lower,
|
|
int? upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'width',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
}
|
|
|
|
extension AssetQueryObject on QueryBuilder<Asset, Asset, QFilterCondition> {}
|
|
|
|
extension AssetQueryLinks on QueryBuilder<Asset, Asset, QFilterCondition> {}
|
|
|
|
extension AssetQuerySortBy on QueryBuilder<Asset, Asset, QSortBy> {
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByChecksum() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'checksum', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByChecksumDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'checksum', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByDurationInSeconds() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'durationInSeconds', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByDurationInSecondsDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'durationInSeconds', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByFileCreatedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileCreatedAt', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByFileCreatedAtDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileCreatedAt', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByFileModifiedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileModifiedAt', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByFileModifiedAtDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileModifiedAt', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByFileName() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileName', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByFileNameDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileName', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByHeight() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'height', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByHeightDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'height', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByIsArchived() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isArchived', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByIsArchivedDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isArchived', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByIsFavorite() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isFavorite', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByIsFavoriteDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isFavorite', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByIsTrashed() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isTrashed', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByIsTrashedDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isTrashed', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByLivePhotoVideoId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'livePhotoVideoId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByLivePhotoVideoIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'livePhotoVideoId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByLocalId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'localId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByLocalIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'localId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByOwnerId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'ownerId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByOwnerIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'ownerId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByRemoteId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'remoteId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByRemoteIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'remoteId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByStackCount() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'stackCount', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByStackCountDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'stackCount', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByStackParentId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'stackParentId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByStackParentIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'stackParentId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByType() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'type', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByTypeDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'type', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByUpdatedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'updatedAt', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByUpdatedAtDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'updatedAt', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByWidth() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'width', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> sortByWidthDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'width', Sort.desc);
|
|
});
|
|
}
|
|
}
|
|
|
|
extension AssetQuerySortThenBy on QueryBuilder<Asset, Asset, QSortThenBy> {
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByChecksum() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'checksum', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByChecksumDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'checksum', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByDurationInSeconds() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'durationInSeconds', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByDurationInSecondsDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'durationInSeconds', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByFileCreatedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileCreatedAt', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByFileCreatedAtDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileCreatedAt', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByFileModifiedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileModifiedAt', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByFileModifiedAtDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileModifiedAt', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByFileName() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileName', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByFileNameDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'fileName', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByHeight() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'height', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByHeightDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'height', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenById() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'id', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'id', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByIsArchived() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isArchived', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByIsArchivedDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isArchived', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByIsFavorite() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isFavorite', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByIsFavoriteDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isFavorite', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByIsTrashed() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isTrashed', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByIsTrashedDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'isTrashed', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByLivePhotoVideoId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'livePhotoVideoId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByLivePhotoVideoIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'livePhotoVideoId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByLocalId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'localId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByLocalIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'localId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByOwnerId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'ownerId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByOwnerIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'ownerId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByRemoteId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'remoteId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByRemoteIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'remoteId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByStackCount() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'stackCount', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByStackCountDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'stackCount', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByStackParentId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'stackParentId', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByStackParentIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'stackParentId', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByType() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'type', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByTypeDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'type', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByUpdatedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'updatedAt', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByUpdatedAtDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'updatedAt', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByWidth() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'width', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QAfterSortBy> thenByWidthDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'width', Sort.desc);
|
|
});
|
|
}
|
|
}
|
|
|
|
extension AssetQueryWhereDistinct on QueryBuilder<Asset, Asset, QDistinct> {
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByChecksum(
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'checksum', caseSensitive: caseSensitive);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByDurationInSeconds() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'durationInSeconds');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByFileCreatedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'fileCreatedAt');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByFileModifiedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'fileModifiedAt');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByFileName(
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'fileName', caseSensitive: caseSensitive);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByHeight() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'height');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByIsArchived() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'isArchived');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByIsFavorite() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'isFavorite');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByIsTrashed() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'isTrashed');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByLivePhotoVideoId(
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'livePhotoVideoId',
|
|
caseSensitive: caseSensitive);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByLocalId(
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'localId', caseSensitive: caseSensitive);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByOwnerId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'ownerId');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByRemoteId(
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'remoteId', caseSensitive: caseSensitive);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByStackCount() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'stackCount');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByStackParentId(
|
|
{bool caseSensitive = true}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'stackParentId',
|
|
caseSensitive: caseSensitive);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByType() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'type');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByUpdatedAt() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'updatedAt');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, Asset, QDistinct> distinctByWidth() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'width');
|
|
});
|
|
}
|
|
}
|
|
|
|
extension AssetQueryProperty on QueryBuilder<Asset, Asset, QQueryProperty> {
|
|
QueryBuilder<Asset, int, QQueryOperations> idProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'id');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, String, QQueryOperations> checksumProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'checksum');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, int, QQueryOperations> durationInSecondsProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'durationInSeconds');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, DateTime, QQueryOperations> fileCreatedAtProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'fileCreatedAt');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, DateTime, QQueryOperations> fileModifiedAtProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'fileModifiedAt');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, String, QQueryOperations> fileNameProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'fileName');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, int?, QQueryOperations> heightProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'height');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, bool, QQueryOperations> isArchivedProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'isArchived');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, bool, QQueryOperations> isFavoriteProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'isFavorite');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, bool, QQueryOperations> isTrashedProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'isTrashed');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, String?, QQueryOperations> livePhotoVideoIdProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'livePhotoVideoId');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, String?, QQueryOperations> localIdProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'localId');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, int, QQueryOperations> ownerIdProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'ownerId');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, String?, QQueryOperations> remoteIdProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'remoteId');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, int?, QQueryOperations> stackCountProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'stackCount');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, String?, QQueryOperations> stackParentIdProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'stackParentId');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, AssetType, QQueryOperations> typeProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'type');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, DateTime, QQueryOperations> updatedAtProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'updatedAt');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<Asset, int?, QQueryOperations> widthProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'width');
|
|
});
|
|
}
|
|
}
|