1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-17 12:22:31 +02:00
immich/mobile/lib/shared/models/album.g.dart
Alex 237d1c1bf4
fix(mobile): incorrect date range (#4644)
* fix(mobile): incorrect date range

* remove comment

* pr feedback
2023-10-25 16:56:31 -05:00

1742 lines
48 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'album.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 GetAlbumCollection on Isar {
IsarCollection<Album> get albums => this.collection();
}
const AlbumSchema = CollectionSchema(
name: r'Album',
id: -1355968412107120937,
properties: {
r'createdAt': PropertySchema(
id: 0,
name: r'createdAt',
type: IsarType.dateTime,
),
r'endDate': PropertySchema(
id: 1,
name: r'endDate',
type: IsarType.dateTime,
),
r'lastModifiedAssetTimestamp': PropertySchema(
id: 2,
name: r'lastModifiedAssetTimestamp',
type: IsarType.dateTime,
),
r'localId': PropertySchema(
id: 3,
name: r'localId',
type: IsarType.string,
),
r'modifiedAt': PropertySchema(
id: 4,
name: r'modifiedAt',
type: IsarType.dateTime,
),
r'name': PropertySchema(
id: 5,
name: r'name',
type: IsarType.string,
),
r'remoteId': PropertySchema(
id: 6,
name: r'remoteId',
type: IsarType.string,
),
r'shared': PropertySchema(
id: 7,
name: r'shared',
type: IsarType.bool,
),
r'startDate': PropertySchema(
id: 8,
name: r'startDate',
type: IsarType.dateTime,
)
},
estimateSize: _albumEstimateSize,
serialize: _albumSerialize,
deserialize: _albumDeserialize,
deserializeProp: _albumDeserializeProp,
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,
)
],
)
},
links: {
r'owner': LinkSchema(
id: 8272576585804958029,
name: r'owner',
target: r'User',
single: true,
),
r'thumbnail': LinkSchema(
id: 4055421409629988258,
name: r'thumbnail',
target: r'Asset',
single: true,
),
r'sharedUsers': LinkSchema(
id: 8972835302564625434,
name: r'sharedUsers',
target: r'User',
single: false,
),
r'assets': LinkSchema(
id: 1059358332698388152,
name: r'assets',
target: r'Asset',
single: false,
)
},
embeddedSchemas: {},
getId: _albumGetId,
getLinks: _albumGetLinks,
attach: _albumAttach,
version: '3.1.0+1',
);
int _albumEstimateSize(
Album object,
List<int> offsets,
Map<Type, List<int>> allOffsets,
) {
var bytesCount = offsets.last;
{
final value = object.localId;
if (value != null) {
bytesCount += 3 + value.length * 3;
}
}
bytesCount += 3 + object.name.length * 3;
{
final value = object.remoteId;
if (value != null) {
bytesCount += 3 + value.length * 3;
}
}
return bytesCount;
}
void _albumSerialize(
Album object,
IsarWriter writer,
List<int> offsets,
Map<Type, List<int>> allOffsets,
) {
writer.writeDateTime(offsets[0], object.createdAt);
writer.writeDateTime(offsets[1], object.endDate);
writer.writeDateTime(offsets[2], object.lastModifiedAssetTimestamp);
writer.writeString(offsets[3], object.localId);
writer.writeDateTime(offsets[4], object.modifiedAt);
writer.writeString(offsets[5], object.name);
writer.writeString(offsets[6], object.remoteId);
writer.writeBool(offsets[7], object.shared);
writer.writeDateTime(offsets[8], object.startDate);
}
Album _albumDeserialize(
Id id,
IsarReader reader,
List<int> offsets,
Map<Type, List<int>> allOffsets,
) {
final object = Album(
createdAt: reader.readDateTime(offsets[0]),
endDate: reader.readDateTimeOrNull(offsets[1]),
lastModifiedAssetTimestamp: reader.readDateTimeOrNull(offsets[2]),
localId: reader.readStringOrNull(offsets[3]),
modifiedAt: reader.readDateTime(offsets[4]),
name: reader.readString(offsets[5]),
remoteId: reader.readStringOrNull(offsets[6]),
shared: reader.readBool(offsets[7]),
startDate: reader.readDateTimeOrNull(offsets[8]),
);
object.id = id;
return object;
}
P _albumDeserializeProp<P>(
IsarReader reader,
int propertyId,
int offset,
Map<Type, List<int>> allOffsets,
) {
switch (propertyId) {
case 0:
return (reader.readDateTime(offset)) as P;
case 1:
return (reader.readDateTimeOrNull(offset)) as P;
case 2:
return (reader.readDateTimeOrNull(offset)) as P;
case 3:
return (reader.readStringOrNull(offset)) as P;
case 4:
return (reader.readDateTime(offset)) as P;
case 5:
return (reader.readString(offset)) as P;
case 6:
return (reader.readStringOrNull(offset)) as P;
case 7:
return (reader.readBool(offset)) as P;
case 8:
return (reader.readDateTimeOrNull(offset)) as P;
default:
throw IsarError('Unknown property with id $propertyId');
}
}
Id _albumGetId(Album object) {
return object.id;
}
List<IsarLinkBase<dynamic>> _albumGetLinks(Album object) {
return [object.owner, object.thumbnail, object.sharedUsers, object.assets];
}
void _albumAttach(IsarCollection<dynamic> col, Id id, Album object) {
object.id = id;
object.owner.attach(col, col.isar.collection<User>(), r'owner', id);
object.thumbnail.attach(col, col.isar.collection<Asset>(), r'thumbnail', id);
object.sharedUsers
.attach(col, col.isar.collection<User>(), r'sharedUsers', id);
object.assets.attach(col, col.isar.collection<Asset>(), r'assets', id);
}
extension AlbumQueryWhereSort on QueryBuilder<Album, Album, QWhere> {
QueryBuilder<Album, Album, QAfterWhere> anyId() {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(const IdWhereClause.any());
});
}
}
extension AlbumQueryWhere on QueryBuilder<Album, Album, QWhereClause> {
QueryBuilder<Album, Album, QAfterWhereClause> idEqualTo(Id id) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IdWhereClause.between(
lower: id,
upper: id,
));
});
}
QueryBuilder<Album, Album, 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<Album, Album, QAfterWhereClause> idGreaterThan(Id id,
{bool include = false}) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(
IdWhereClause.greaterThan(lower: id, includeLower: include),
);
});
}
QueryBuilder<Album, Album, QAfterWhereClause> idLessThan(Id id,
{bool include = false}) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(
IdWhereClause.lessThan(upper: id, includeUpper: include),
);
});
}
QueryBuilder<Album, Album, 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<Album, Album, QAfterWhereClause> remoteIdIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IndexWhereClause.equalTo(
indexName: r'remoteId',
value: [null],
));
});
}
QueryBuilder<Album, Album, QAfterWhereClause> remoteIdIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IndexWhereClause.between(
indexName: r'remoteId',
lower: [null],
includeLower: false,
upper: [],
));
});
}
QueryBuilder<Album, Album, QAfterWhereClause> remoteIdEqualTo(
String? remoteId) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IndexWhereClause.equalTo(
indexName: r'remoteId',
value: [remoteId],
));
});
}
QueryBuilder<Album, Album, 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<Album, Album, QAfterWhereClause> localIdIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IndexWhereClause.equalTo(
indexName: r'localId',
value: [null],
));
});
}
QueryBuilder<Album, Album, QAfterWhereClause> localIdIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IndexWhereClause.between(
indexName: r'localId',
lower: [null],
includeLower: false,
upper: [],
));
});
}
QueryBuilder<Album, Album, QAfterWhereClause> localIdEqualTo(
String? localId) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IndexWhereClause.equalTo(
indexName: r'localId',
value: [localId],
));
});
}
QueryBuilder<Album, Album, 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,
));
}
});
}
}
extension AlbumQueryFilter on QueryBuilder<Album, Album, QFilterCondition> {
QueryBuilder<Album, Album, QAfterFilterCondition> createdAtEqualTo(
DateTime value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'createdAt',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> createdAtGreaterThan(
DateTime value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
property: r'createdAt',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> createdAtLessThan(
DateTime value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
property: r'createdAt',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> createdAtBetween(
DateTime lower,
DateTime upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
property: r'createdAt',
lower: lower,
includeLower: includeLower,
upper: upper,
includeUpper: includeUpper,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> endDateIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNull(
property: r'endDate',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> endDateIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNotNull(
property: r'endDate',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> endDateEqualTo(
DateTime? value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'endDate',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> endDateGreaterThan(
DateTime? value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
property: r'endDate',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> endDateLessThan(
DateTime? value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
property: r'endDate',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> endDateBetween(
DateTime? lower,
DateTime? upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
property: r'endDate',
lower: lower,
includeLower: includeLower,
upper: upper,
includeUpper: includeUpper,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> idEqualTo(Id value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'id',
value: value,
));
});
}
QueryBuilder<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, QAfterFilterCondition>
lastModifiedAssetTimestampIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNull(
property: r'lastModifiedAssetTimestamp',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition>
lastModifiedAssetTimestampIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNotNull(
property: r'lastModifiedAssetTimestamp',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition>
lastModifiedAssetTimestampEqualTo(DateTime? value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'lastModifiedAssetTimestamp',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition>
lastModifiedAssetTimestampGreaterThan(
DateTime? value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
property: r'lastModifiedAssetTimestamp',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition>
lastModifiedAssetTimestampLessThan(
DateTime? value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
property: r'lastModifiedAssetTimestamp',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition>
lastModifiedAssetTimestampBetween(
DateTime? lower,
DateTime? upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
property: r'lastModifiedAssetTimestamp',
lower: lower,
includeLower: includeLower,
upper: upper,
includeUpper: includeUpper,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> localIdIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNull(
property: r'localId',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> localIdIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNotNull(
property: r'localId',
));
});
}
QueryBuilder<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, QAfterFilterCondition> localIdIsEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'localId',
value: '',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> localIdIsNotEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
property: r'localId',
value: '',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> modifiedAtEqualTo(
DateTime value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'modifiedAt',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> modifiedAtGreaterThan(
DateTime value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
property: r'modifiedAt',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> modifiedAtLessThan(
DateTime value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
property: r'modifiedAt',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> modifiedAtBetween(
DateTime lower,
DateTime upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
property: r'modifiedAt',
lower: lower,
includeLower: includeLower,
upper: upper,
includeUpper: includeUpper,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameEqualTo(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'name',
value: value,
caseSensitive: caseSensitive,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameGreaterThan(
String value, {
bool include = false,
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
property: r'name',
value: value,
caseSensitive: caseSensitive,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameLessThan(
String value, {
bool include = false,
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
property: r'name',
value: value,
caseSensitive: caseSensitive,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameBetween(
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'name',
lower: lower,
includeLower: includeLower,
upper: upper,
includeUpper: includeUpper,
caseSensitive: caseSensitive,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameStartsWith(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.startsWith(
property: r'name',
value: value,
caseSensitive: caseSensitive,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameEndsWith(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.endsWith(
property: r'name',
value: value,
caseSensitive: caseSensitive,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameContains(String value,
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.contains(
property: r'name',
value: value,
caseSensitive: caseSensitive,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameMatches(String pattern,
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.matches(
property: r'name',
wildcard: pattern,
caseSensitive: caseSensitive,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameIsEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'name',
value: '',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> nameIsNotEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
property: r'name',
value: '',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> remoteIdIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNull(
property: r'remoteId',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> remoteIdIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNotNull(
property: r'remoteId',
));
});
}
QueryBuilder<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, 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<Album, Album, QAfterFilterCondition> remoteIdIsEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'remoteId',
value: '',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> remoteIdIsNotEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
property: r'remoteId',
value: '',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> sharedEqualTo(bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'shared',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> startDateIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNull(
property: r'startDate',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> startDateIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNotNull(
property: r'startDate',
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> startDateEqualTo(
DateTime? value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'startDate',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> startDateGreaterThan(
DateTime? value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
property: r'startDate',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> startDateLessThan(
DateTime? value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
property: r'startDate',
value: value,
));
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> startDateBetween(
DateTime? lower,
DateTime? upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
property: r'startDate',
lower: lower,
includeLower: includeLower,
upper: upper,
includeUpper: includeUpper,
));
});
}
}
extension AlbumQueryObject on QueryBuilder<Album, Album, QFilterCondition> {}
extension AlbumQueryLinks on QueryBuilder<Album, Album, QFilterCondition> {
QueryBuilder<Album, Album, QAfterFilterCondition> owner(FilterQuery<User> q) {
return QueryBuilder.apply(this, (query) {
return query.link(q, r'owner');
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> ownerIsNull() {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'owner', 0, true, 0, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> thumbnail(
FilterQuery<Asset> q) {
return QueryBuilder.apply(this, (query) {
return query.link(q, r'thumbnail');
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> thumbnailIsNull() {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'thumbnail', 0, true, 0, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> sharedUsers(
FilterQuery<User> q) {
return QueryBuilder.apply(this, (query) {
return query.link(q, r'sharedUsers');
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> sharedUsersLengthEqualTo(
int length) {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'sharedUsers', length, true, length, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> sharedUsersIsEmpty() {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'sharedUsers', 0, true, 0, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> sharedUsersIsNotEmpty() {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'sharedUsers', 0, false, 999999, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> sharedUsersLengthLessThan(
int length, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'sharedUsers', 0, true, length, include);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition>
sharedUsersLengthGreaterThan(
int length, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'sharedUsers', length, include, 999999, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> sharedUsersLengthBetween(
int lower,
int upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.linkLength(
r'sharedUsers', lower, includeLower, upper, includeUpper);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> assets(
FilterQuery<Asset> q) {
return QueryBuilder.apply(this, (query) {
return query.link(q, r'assets');
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> assetsLengthEqualTo(
int length) {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'assets', length, true, length, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> assetsIsEmpty() {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'assets', 0, true, 0, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> assetsIsNotEmpty() {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'assets', 0, false, 999999, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> assetsLengthLessThan(
int length, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'assets', 0, true, length, include);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> assetsLengthGreaterThan(
int length, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.linkLength(r'assets', length, include, 999999, true);
});
}
QueryBuilder<Album, Album, QAfterFilterCondition> assetsLengthBetween(
int lower,
int upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.linkLength(
r'assets', lower, includeLower, upper, includeUpper);
});
}
}
extension AlbumQuerySortBy on QueryBuilder<Album, Album, QSortBy> {
QueryBuilder<Album, Album, QAfterSortBy> sortByCreatedAt() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'createdAt', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByCreatedAtDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'createdAt', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByEndDate() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'endDate', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByEndDateDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'endDate', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByLastModifiedAssetTimestamp() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'lastModifiedAssetTimestamp', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy>
sortByLastModifiedAssetTimestampDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'lastModifiedAssetTimestamp', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByLocalId() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'localId', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByLocalIdDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'localId', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByModifiedAt() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'modifiedAt', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByModifiedAtDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'modifiedAt', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByName() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'name', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByNameDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'name', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByRemoteId() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'remoteId', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByRemoteIdDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'remoteId', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByShared() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'shared', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortBySharedDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'shared', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByStartDate() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'startDate', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> sortByStartDateDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'startDate', Sort.desc);
});
}
}
extension AlbumQuerySortThenBy on QueryBuilder<Album, Album, QSortThenBy> {
QueryBuilder<Album, Album, QAfterSortBy> thenByCreatedAt() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'createdAt', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByCreatedAtDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'createdAt', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByEndDate() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'endDate', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByEndDateDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'endDate', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenById() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'id', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByIdDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'id', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByLastModifiedAssetTimestamp() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'lastModifiedAssetTimestamp', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy>
thenByLastModifiedAssetTimestampDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'lastModifiedAssetTimestamp', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByLocalId() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'localId', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByLocalIdDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'localId', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByModifiedAt() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'modifiedAt', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByModifiedAtDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'modifiedAt', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByName() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'name', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByNameDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'name', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByRemoteId() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'remoteId', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByRemoteIdDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'remoteId', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByShared() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'shared', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenBySharedDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'shared', Sort.desc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByStartDate() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'startDate', Sort.asc);
});
}
QueryBuilder<Album, Album, QAfterSortBy> thenByStartDateDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'startDate', Sort.desc);
});
}
}
extension AlbumQueryWhereDistinct on QueryBuilder<Album, Album, QDistinct> {
QueryBuilder<Album, Album, QDistinct> distinctByCreatedAt() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'createdAt');
});
}
QueryBuilder<Album, Album, QDistinct> distinctByEndDate() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'endDate');
});
}
QueryBuilder<Album, Album, QDistinct> distinctByLastModifiedAssetTimestamp() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'lastModifiedAssetTimestamp');
});
}
QueryBuilder<Album, Album, QDistinct> distinctByLocalId(
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'localId', caseSensitive: caseSensitive);
});
}
QueryBuilder<Album, Album, QDistinct> distinctByModifiedAt() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'modifiedAt');
});
}
QueryBuilder<Album, Album, QDistinct> distinctByName(
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'name', caseSensitive: caseSensitive);
});
}
QueryBuilder<Album, Album, QDistinct> distinctByRemoteId(
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'remoteId', caseSensitive: caseSensitive);
});
}
QueryBuilder<Album, Album, QDistinct> distinctByShared() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'shared');
});
}
QueryBuilder<Album, Album, QDistinct> distinctByStartDate() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'startDate');
});
}
}
extension AlbumQueryProperty on QueryBuilder<Album, Album, QQueryProperty> {
QueryBuilder<Album, int, QQueryOperations> idProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'id');
});
}
QueryBuilder<Album, DateTime, QQueryOperations> createdAtProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'createdAt');
});
}
QueryBuilder<Album, DateTime?, QQueryOperations> endDateProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'endDate');
});
}
QueryBuilder<Album, DateTime?, QQueryOperations>
lastModifiedAssetTimestampProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'lastModifiedAssetTimestamp');
});
}
QueryBuilder<Album, String?, QQueryOperations> localIdProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'localId');
});
}
QueryBuilder<Album, DateTime, QQueryOperations> modifiedAtProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'modifiedAt');
});
}
QueryBuilder<Album, String, QQueryOperations> nameProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'name');
});
}
QueryBuilder<Album, String?, QQueryOperations> remoteIdProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'remoteId');
});
}
QueryBuilder<Album, bool, QQueryOperations> sharedProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'shared');
});
}
QueryBuilder<Album, DateTime?, QQueryOperations> startDateProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'startDate');
});
}
}