356 lines
9.8 KiB
Dart
356 lines
9.8 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'high_score.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 GetHighScoreCollection on Isar {
|
|
IsarCollection<HighScore> get highScores => this.collection();
|
|
}
|
|
|
|
const HighScoreSchema = CollectionSchema(
|
|
name: r'HighScore',
|
|
id: 6847972554114346288,
|
|
properties: {
|
|
r'highScoreValue': PropertySchema(
|
|
id: 0,
|
|
name: r'highScoreValue',
|
|
type: IsarType.long,
|
|
)
|
|
},
|
|
estimateSize: _highScoreEstimateSize,
|
|
serialize: _highScoreSerialize,
|
|
deserialize: _highScoreDeserialize,
|
|
deserializeProp: _highScoreDeserializeProp,
|
|
idName: r'id',
|
|
indexes: {},
|
|
links: {},
|
|
embeddedSchemas: {},
|
|
getId: _highScoreGetId,
|
|
getLinks: _highScoreGetLinks,
|
|
attach: _highScoreAttach,
|
|
version: '3.1.0+1',
|
|
);
|
|
|
|
int _highScoreEstimateSize(
|
|
HighScore object,
|
|
List<int> offsets,
|
|
Map<Type, List<int>> allOffsets,
|
|
) {
|
|
var bytesCount = offsets.last;
|
|
return bytesCount;
|
|
}
|
|
|
|
void _highScoreSerialize(
|
|
HighScore object,
|
|
IsarWriter writer,
|
|
List<int> offsets,
|
|
Map<Type, List<int>> allOffsets,
|
|
) {
|
|
writer.writeLong(offsets[0], object.highScoreValue);
|
|
}
|
|
|
|
HighScore _highScoreDeserialize(
|
|
Id id,
|
|
IsarReader reader,
|
|
List<int> offsets,
|
|
Map<Type, List<int>> allOffsets,
|
|
) {
|
|
final object = HighScore(
|
|
highScoreValue: reader.readLong(offsets[0]),
|
|
);
|
|
object.id = id;
|
|
return object;
|
|
}
|
|
|
|
P _highScoreDeserializeProp<P>(
|
|
IsarReader reader,
|
|
int propertyId,
|
|
int offset,
|
|
Map<Type, List<int>> allOffsets,
|
|
) {
|
|
switch (propertyId) {
|
|
case 0:
|
|
return (reader.readLong(offset)) as P;
|
|
default:
|
|
throw IsarError('Unknown property with id $propertyId');
|
|
}
|
|
}
|
|
|
|
Id _highScoreGetId(HighScore object) {
|
|
return object.id;
|
|
}
|
|
|
|
List<IsarLinkBase<dynamic>> _highScoreGetLinks(HighScore object) {
|
|
return [];
|
|
}
|
|
|
|
void _highScoreAttach(IsarCollection<dynamic> col, Id id, HighScore object) {
|
|
object.id = id;
|
|
}
|
|
|
|
extension HighScoreQueryWhereSort
|
|
on QueryBuilder<HighScore, HighScore, QWhere> {
|
|
QueryBuilder<HighScore, HighScore, QAfterWhere> anyId() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(const IdWhereClause.any());
|
|
});
|
|
}
|
|
}
|
|
|
|
extension HighScoreQueryWhere
|
|
on QueryBuilder<HighScore, HighScore, QWhereClause> {
|
|
QueryBuilder<HighScore, HighScore, QAfterWhereClause> idEqualTo(Id id) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(IdWhereClause.between(
|
|
lower: id,
|
|
upper: id,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, 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<HighScore, HighScore, QAfterWhereClause> idGreaterThan(Id id,
|
|
{bool include = false}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(
|
|
IdWhereClause.greaterThan(lower: id, includeLower: include),
|
|
);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterWhereClause> idLessThan(Id id,
|
|
{bool include = false}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addWhereClause(
|
|
IdWhereClause.lessThan(upper: id, includeUpper: include),
|
|
);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, 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,
|
|
));
|
|
});
|
|
}
|
|
}
|
|
|
|
extension HighScoreQueryFilter
|
|
on QueryBuilder<HighScore, HighScore, QFilterCondition> {
|
|
QueryBuilder<HighScore, HighScore, QAfterFilterCondition>
|
|
highScoreValueEqualTo(int value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'highScoreValue',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterFilterCondition>
|
|
highScoreValueGreaterThan(
|
|
int value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
|
include: include,
|
|
property: r'highScoreValue',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterFilterCondition>
|
|
highScoreValueLessThan(
|
|
int value, {
|
|
bool include = false,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.lessThan(
|
|
include: include,
|
|
property: r'highScoreValue',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterFilterCondition>
|
|
highScoreValueBetween(
|
|
int lower,
|
|
int upper, {
|
|
bool includeLower = true,
|
|
bool includeUpper = true,
|
|
}) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.between(
|
|
property: r'highScoreValue',
|
|
lower: lower,
|
|
includeLower: includeLower,
|
|
upper: upper,
|
|
includeUpper: includeUpper,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterFilterCondition> idEqualTo(
|
|
Id value) {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addFilterCondition(FilterCondition.equalTo(
|
|
property: r'id',
|
|
value: value,
|
|
));
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, 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<HighScore, HighScore, 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<HighScore, HighScore, 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,
|
|
));
|
|
});
|
|
}
|
|
}
|
|
|
|
extension HighScoreQueryObject
|
|
on QueryBuilder<HighScore, HighScore, QFilterCondition> {}
|
|
|
|
extension HighScoreQueryLinks
|
|
on QueryBuilder<HighScore, HighScore, QFilterCondition> {}
|
|
|
|
extension HighScoreQuerySortBy on QueryBuilder<HighScore, HighScore, QSortBy> {
|
|
QueryBuilder<HighScore, HighScore, QAfterSortBy> sortByHighScoreValue() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'highScoreValue', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterSortBy> sortByHighScoreValueDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'highScoreValue', Sort.desc);
|
|
});
|
|
}
|
|
}
|
|
|
|
extension HighScoreQuerySortThenBy
|
|
on QueryBuilder<HighScore, HighScore, QSortThenBy> {
|
|
QueryBuilder<HighScore, HighScore, QAfterSortBy> thenByHighScoreValue() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'highScoreValue', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterSortBy> thenByHighScoreValueDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'highScoreValue', Sort.desc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterSortBy> thenById() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'id', Sort.asc);
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, HighScore, QAfterSortBy> thenByIdDesc() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addSortBy(r'id', Sort.desc);
|
|
});
|
|
}
|
|
}
|
|
|
|
extension HighScoreQueryWhereDistinct
|
|
on QueryBuilder<HighScore, HighScore, QDistinct> {
|
|
QueryBuilder<HighScore, HighScore, QDistinct> distinctByHighScoreValue() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addDistinctBy(r'highScoreValue');
|
|
});
|
|
}
|
|
}
|
|
|
|
extension HighScoreQueryProperty
|
|
on QueryBuilder<HighScore, HighScore, QQueryProperty> {
|
|
QueryBuilder<HighScore, int, QQueryOperations> idProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'id');
|
|
});
|
|
}
|
|
|
|
QueryBuilder<HighScore, int, QQueryOperations> highScoreValueProperty() {
|
|
return QueryBuilder.apply(this, (query) {
|
|
return query.addPropertyName(r'highScoreValue');
|
|
});
|
|
}
|
|
}
|