// 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 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'localId': PropertySchema( id: 1, name: r'localId', type: IsarType.string, ), r'modifiedAt': PropertySchema( id: 2, name: r'modifiedAt', type: IsarType.dateTime, ), r'name': PropertySchema( id: 3, name: r'name', type: IsarType.string, ), r'remoteId': PropertySchema( id: 4, name: r'remoteId', type: IsarType.string, ), r'shared': PropertySchema( id: 5, name: r'shared', type: IsarType.bool, ) }, 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 offsets, Map> 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 offsets, Map> allOffsets, ) { writer.writeDateTime(offsets[0], object.createdAt); writer.writeString(offsets[1], object.localId); writer.writeDateTime(offsets[2], object.modifiedAt); writer.writeString(offsets[3], object.name); writer.writeString(offsets[4], object.remoteId); writer.writeBool(offsets[5], object.shared); } Album _albumDeserialize( Id id, IsarReader reader, List offsets, Map> allOffsets, ) { final object = Album( createdAt: reader.readDateTime(offsets[0]), localId: reader.readStringOrNull(offsets[1]), modifiedAt: reader.readDateTime(offsets[2]), name: reader.readString(offsets[3]), remoteId: reader.readStringOrNull(offsets[4]), shared: reader.readBool(offsets[5]), ); object.id = id; return object; } P _albumDeserializeProp

( IsarReader reader, int propertyId, int offset, Map> allOffsets, ) { switch (propertyId) { case 0: return (reader.readDateTime(offset)) as P; case 1: return (reader.readStringOrNull(offset)) as P; case 2: return (reader.readDateTime(offset)) as P; case 3: return (reader.readString(offset)) as P; case 4: return (reader.readStringOrNull(offset)) as P; case 5: return (reader.readBool(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } } Id _albumGetId(Album object) { return object.id; } List> _albumGetLinks(Album object) { return [object.owner, object.thumbnail, object.sharedUsers, object.assets]; } void _albumAttach(IsarCollection col, Id id, Album object) { object.id = id; object.owner.attach(col, col.isar.collection(), r'owner', id); object.thumbnail.attach(col, col.isar.collection(), r'thumbnail', id); object.sharedUsers .attach(col, col.isar.collection(), r'sharedUsers', id); object.assets.attach(col, col.isar.collection(), r'assets', id); } extension AlbumQueryWhereSort on QueryBuilder { QueryBuilder anyId() { return QueryBuilder.apply(this, (query) { return query.addWhereClause(const IdWhereClause.any()); }); } } extension AlbumQueryWhere on QueryBuilder { QueryBuilder idEqualTo(Id id) { return QueryBuilder.apply(this, (query) { return query.addWhereClause(IdWhereClause.between( lower: id, upper: id, )); }); } QueryBuilder 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 idGreaterThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.greaterThan(lower: id, includeLower: include), ); }); } QueryBuilder idLessThan(Id id, {bool include = false}) { return QueryBuilder.apply(this, (query) { return query.addWhereClause( IdWhereClause.lessThan(upper: id, includeUpper: include), ); }); } QueryBuilder 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 remoteIdIsNull() { return QueryBuilder.apply(this, (query) { return query.addWhereClause(IndexWhereClause.equalTo( indexName: r'remoteId', value: [null], )); }); } QueryBuilder remoteIdIsNotNull() { return QueryBuilder.apply(this, (query) { return query.addWhereClause(IndexWhereClause.between( indexName: r'remoteId', lower: [null], includeLower: false, upper: [], )); }); } QueryBuilder remoteIdEqualTo( String? remoteId) { return QueryBuilder.apply(this, (query) { return query.addWhereClause(IndexWhereClause.equalTo( indexName: r'remoteId', value: [remoteId], )); }); } QueryBuilder 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 localIdIsNull() { return QueryBuilder.apply(this, (query) { return query.addWhereClause(IndexWhereClause.equalTo( indexName: r'localId', value: [null], )); }); } QueryBuilder localIdIsNotNull() { return QueryBuilder.apply(this, (query) { return query.addWhereClause(IndexWhereClause.between( indexName: r'localId', lower: [null], includeLower: false, upper: [], )); }); } QueryBuilder localIdEqualTo( String? localId) { return QueryBuilder.apply(this, (query) { return query.addWhereClause(IndexWhereClause.equalTo( indexName: r'localId', value: [localId], )); }); } QueryBuilder 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 { QueryBuilder createdAtEqualTo( DateTime value) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'createdAt', value: value, )); }); } QueryBuilder createdAtGreaterThan( DateTime value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.greaterThan( include: include, property: r'createdAt', value: value, )); }); } QueryBuilder createdAtLessThan( DateTime value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.lessThan( include: include, property: r'createdAt', value: value, )); }); } QueryBuilder 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 idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'id', value: value, )); }); } QueryBuilder idGreaterThan( Id value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.greaterThan( include: include, property: r'id', value: value, )); }); } QueryBuilder idLessThan( Id value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.lessThan( include: include, property: r'id', value: value, )); }); } QueryBuilder 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 localIdIsNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNull( property: r'localId', )); }); } QueryBuilder localIdIsNotNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNotNull( property: r'localId', )); }); } QueryBuilder localIdEqualTo( String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'localId', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder 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 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 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 localIdStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.startsWith( property: r'localId', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder localIdEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.endsWith( property: r'localId', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder localIdContains( String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.contains( property: r'localId', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder localIdMatches( String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.matches( property: r'localId', wildcard: pattern, caseSensitive: caseSensitive, )); }); } QueryBuilder localIdIsEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'localId', value: '', )); }); } QueryBuilder localIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.greaterThan( property: r'localId', value: '', )); }); } QueryBuilder modifiedAtEqualTo( DateTime value) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'modifiedAt', value: value, )); }); } QueryBuilder modifiedAtGreaterThan( DateTime value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.greaterThan( include: include, property: r'modifiedAt', value: value, )); }); } QueryBuilder modifiedAtLessThan( DateTime value, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.lessThan( include: include, property: r'modifiedAt', value: value, )); }); } QueryBuilder 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 nameEqualTo( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'name', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder 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 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 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 nameStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.startsWith( property: r'name', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder nameEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.endsWith( property: r'name', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder nameContains(String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.contains( property: r'name', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder nameMatches(String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.matches( property: r'name', wildcard: pattern, caseSensitive: caseSensitive, )); }); } QueryBuilder nameIsEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'name', value: '', )); }); } QueryBuilder nameIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.greaterThan( property: r'name', value: '', )); }); } QueryBuilder remoteIdIsNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNull( property: r'remoteId', )); }); } QueryBuilder remoteIdIsNotNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNotNull( property: r'remoteId', )); }); } QueryBuilder remoteIdEqualTo( String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'remoteId', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder 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 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 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 remoteIdStartsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.startsWith( property: r'remoteId', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder remoteIdEndsWith( String value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.endsWith( property: r'remoteId', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder remoteIdContains( String value, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.contains( property: r'remoteId', value: value, caseSensitive: caseSensitive, )); }); } QueryBuilder remoteIdMatches( String pattern, {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.matches( property: r'remoteId', wildcard: pattern, caseSensitive: caseSensitive, )); }); } QueryBuilder remoteIdIsEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'remoteId', value: '', )); }); } QueryBuilder remoteIdIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.greaterThan( property: r'remoteId', value: '', )); }); } QueryBuilder sharedEqualTo(bool value) { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(FilterCondition.equalTo( property: r'shared', value: value, )); }); } } extension AlbumQueryObject on QueryBuilder {} extension AlbumQueryLinks on QueryBuilder { QueryBuilder owner(FilterQuery q) { return QueryBuilder.apply(this, (query) { return query.link(q, r'owner'); }); } QueryBuilder ownerIsNull() { return QueryBuilder.apply(this, (query) { return query.linkLength(r'owner', 0, true, 0, true); }); } QueryBuilder thumbnail( FilterQuery q) { return QueryBuilder.apply(this, (query) { return query.link(q, r'thumbnail'); }); } QueryBuilder thumbnailIsNull() { return QueryBuilder.apply(this, (query) { return query.linkLength(r'thumbnail', 0, true, 0, true); }); } QueryBuilder sharedUsers( FilterQuery q) { return QueryBuilder.apply(this, (query) { return query.link(q, r'sharedUsers'); }); } QueryBuilder sharedUsersLengthEqualTo( int length) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'sharedUsers', length, true, length, true); }); } QueryBuilder sharedUsersIsEmpty() { return QueryBuilder.apply(this, (query) { return query.linkLength(r'sharedUsers', 0, true, 0, true); }); } QueryBuilder sharedUsersIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.linkLength(r'sharedUsers', 0, false, 999999, true); }); } QueryBuilder sharedUsersLengthLessThan( int length, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'sharedUsers', 0, true, length, include); }); } QueryBuilder sharedUsersLengthGreaterThan( int length, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'sharedUsers', length, include, 999999, true); }); } QueryBuilder 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 assets( FilterQuery q) { return QueryBuilder.apply(this, (query) { return query.link(q, r'assets'); }); } QueryBuilder assetsLengthEqualTo( int length) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'assets', length, true, length, true); }); } QueryBuilder assetsIsEmpty() { return QueryBuilder.apply(this, (query) { return query.linkLength(r'assets', 0, true, 0, true); }); } QueryBuilder assetsIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.linkLength(r'assets', 0, false, 999999, true); }); } QueryBuilder assetsLengthLessThan( int length, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'assets', 0, true, length, include); }); } QueryBuilder assetsLengthGreaterThan( int length, { bool include = false, }) { return QueryBuilder.apply(this, (query) { return query.linkLength(r'assets', length, include, 999999, true); }); } QueryBuilder 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 { QueryBuilder sortByCreatedAt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'createdAt', Sort.asc); }); } QueryBuilder sortByCreatedAtDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'createdAt', Sort.desc); }); } QueryBuilder sortByLocalId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'localId', Sort.asc); }); } QueryBuilder sortByLocalIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'localId', Sort.desc); }); } QueryBuilder sortByModifiedAt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'modifiedAt', Sort.asc); }); } QueryBuilder sortByModifiedAtDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'modifiedAt', Sort.desc); }); } QueryBuilder sortByName() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'name', Sort.asc); }); } QueryBuilder sortByNameDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'name', Sort.desc); }); } QueryBuilder sortByRemoteId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'remoteId', Sort.asc); }); } QueryBuilder sortByRemoteIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'remoteId', Sort.desc); }); } QueryBuilder sortByShared() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'shared', Sort.asc); }); } QueryBuilder sortBySharedDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'shared', Sort.desc); }); } } extension AlbumQuerySortThenBy on QueryBuilder { QueryBuilder thenByCreatedAt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'createdAt', Sort.asc); }); } QueryBuilder thenByCreatedAtDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'createdAt', Sort.desc); }); } QueryBuilder thenById() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'id', Sort.asc); }); } QueryBuilder thenByIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'id', Sort.desc); }); } QueryBuilder thenByLocalId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'localId', Sort.asc); }); } QueryBuilder thenByLocalIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'localId', Sort.desc); }); } QueryBuilder thenByModifiedAt() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'modifiedAt', Sort.asc); }); } QueryBuilder thenByModifiedAtDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'modifiedAt', Sort.desc); }); } QueryBuilder thenByName() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'name', Sort.asc); }); } QueryBuilder thenByNameDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'name', Sort.desc); }); } QueryBuilder thenByRemoteId() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'remoteId', Sort.asc); }); } QueryBuilder thenByRemoteIdDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'remoteId', Sort.desc); }); } QueryBuilder thenByShared() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'shared', Sort.asc); }); } QueryBuilder thenBySharedDesc() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'shared', Sort.desc); }); } } extension AlbumQueryWhereDistinct on QueryBuilder { QueryBuilder distinctByCreatedAt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'createdAt'); }); } QueryBuilder distinctByLocalId( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'localId', caseSensitive: caseSensitive); }); } QueryBuilder distinctByModifiedAt() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'modifiedAt'); }); } QueryBuilder distinctByName( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'name', caseSensitive: caseSensitive); }); } QueryBuilder distinctByRemoteId( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'remoteId', caseSensitive: caseSensitive); }); } QueryBuilder distinctByShared() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'shared'); }); } } extension AlbumQueryProperty on QueryBuilder { QueryBuilder idProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'id'); }); } QueryBuilder createdAtProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'createdAt'); }); } QueryBuilder localIdProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'localId'); }); } QueryBuilder modifiedAtProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'modifiedAt'); }); } QueryBuilder nameProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'name'); }); } QueryBuilder remoteIdProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'remoteId'); }); } QueryBuilder sharedProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'shared'); }); } }