2936 lines
90 KiB
Dart
2936 lines
90 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'app_database.dart';
|
|
|
|
// ignore_for_file: type=lint
|
|
class $SearchHistoryTable extends SearchHistory
|
|
with TableInfo<$SearchHistoryTable, SearchHistoryData> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$SearchHistoryTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
|
@override
|
|
late final GeneratedColumn<int> id = GeneratedColumn<int>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
hasAutoIncrement: true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
|
'PRIMARY KEY AUTOINCREMENT',
|
|
),
|
|
);
|
|
static const VerificationMeta _queryMeta = const VerificationMeta('query');
|
|
@override
|
|
late final GeneratedColumn<String> query = GeneratedColumn<String>(
|
|
'query',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _latitudeMeta = const VerificationMeta(
|
|
'latitude',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<double> latitude = GeneratedColumn<double>(
|
|
'latitude',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _longitudeMeta = const VerificationMeta(
|
|
'longitude',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<double> longitude = GeneratedColumn<double>(
|
|
'longitude',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _timestampMeta = const VerificationMeta(
|
|
'timestamp',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<int> timestamp = GeneratedColumn<int>(
|
|
'timestamp',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
query,
|
|
latitude,
|
|
longitude,
|
|
timestamp,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'search_history';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<SearchHistoryData> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('id')) {
|
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
|
}
|
|
if (data.containsKey('query')) {
|
|
context.handle(
|
|
_queryMeta,
|
|
query.isAcceptableOrUnknown(data['query']!, _queryMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_queryMeta);
|
|
}
|
|
if (data.containsKey('latitude')) {
|
|
context.handle(
|
|
_latitudeMeta,
|
|
latitude.isAcceptableOrUnknown(data['latitude']!, _latitudeMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('longitude')) {
|
|
context.handle(
|
|
_longitudeMeta,
|
|
longitude.isAcceptableOrUnknown(data['longitude']!, _longitudeMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('timestamp')) {
|
|
context.handle(
|
|
_timestampMeta,
|
|
timestamp.isAcceptableOrUnknown(data['timestamp']!, _timestampMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_timestampMeta);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
SearchHistoryData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return SearchHistoryData(
|
|
id:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}id'],
|
|
)!,
|
|
query:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}query'],
|
|
)!,
|
|
latitude: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}latitude'],
|
|
),
|
|
longitude: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}longitude'],
|
|
),
|
|
timestamp:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}timestamp'],
|
|
)!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$SearchHistoryTable createAlias(String alias) {
|
|
return $SearchHistoryTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class SearchHistoryData extends DataClass
|
|
implements Insertable<SearchHistoryData> {
|
|
final int id;
|
|
final String query;
|
|
final double? latitude;
|
|
final double? longitude;
|
|
final int timestamp;
|
|
const SearchHistoryData({
|
|
required this.id,
|
|
required this.query,
|
|
this.latitude,
|
|
this.longitude,
|
|
required this.timestamp,
|
|
});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['id'] = Variable<int>(id);
|
|
map['query'] = Variable<String>(query);
|
|
if (!nullToAbsent || latitude != null) {
|
|
map['latitude'] = Variable<double>(latitude);
|
|
}
|
|
if (!nullToAbsent || longitude != null) {
|
|
map['longitude'] = Variable<double>(longitude);
|
|
}
|
|
map['timestamp'] = Variable<int>(timestamp);
|
|
return map;
|
|
}
|
|
|
|
SearchHistoryCompanion toCompanion(bool nullToAbsent) {
|
|
return SearchHistoryCompanion(
|
|
id: Value(id),
|
|
query: Value(query),
|
|
latitude:
|
|
latitude == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(latitude),
|
|
longitude:
|
|
longitude == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(longitude),
|
|
timestamp: Value(timestamp),
|
|
);
|
|
}
|
|
|
|
factory SearchHistoryData.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return SearchHistoryData(
|
|
id: serializer.fromJson<int>(json['id']),
|
|
query: serializer.fromJson<String>(json['query']),
|
|
latitude: serializer.fromJson<double?>(json['latitude']),
|
|
longitude: serializer.fromJson<double?>(json['longitude']),
|
|
timestamp: serializer.fromJson<int>(json['timestamp']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<int>(id),
|
|
'query': serializer.toJson<String>(query),
|
|
'latitude': serializer.toJson<double?>(latitude),
|
|
'longitude': serializer.toJson<double?>(longitude),
|
|
'timestamp': serializer.toJson<int>(timestamp),
|
|
};
|
|
}
|
|
|
|
SearchHistoryData copyWith({
|
|
int? id,
|
|
String? query,
|
|
Value<double?> latitude = const Value.absent(),
|
|
Value<double?> longitude = const Value.absent(),
|
|
int? timestamp,
|
|
}) => SearchHistoryData(
|
|
id: id ?? this.id,
|
|
query: query ?? this.query,
|
|
latitude: latitude.present ? latitude.value : this.latitude,
|
|
longitude: longitude.present ? longitude.value : this.longitude,
|
|
timestamp: timestamp ?? this.timestamp,
|
|
);
|
|
SearchHistoryData copyWithCompanion(SearchHistoryCompanion data) {
|
|
return SearchHistoryData(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
query: data.query.present ? data.query.value : this.query,
|
|
latitude: data.latitude.present ? data.latitude.value : this.latitude,
|
|
longitude: data.longitude.present ? data.longitude.value : this.longitude,
|
|
timestamp: data.timestamp.present ? data.timestamp.value : this.timestamp,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('SearchHistoryData(')
|
|
..write('id: $id, ')
|
|
..write('query: $query, ')
|
|
..write('latitude: $latitude, ')
|
|
..write('longitude: $longitude, ')
|
|
..write('timestamp: $timestamp')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(id, query, latitude, longitude, timestamp);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is SearchHistoryData &&
|
|
other.id == this.id &&
|
|
other.query == this.query &&
|
|
other.latitude == this.latitude &&
|
|
other.longitude == this.longitude &&
|
|
other.timestamp == this.timestamp);
|
|
}
|
|
|
|
class SearchHistoryCompanion extends UpdateCompanion<SearchHistoryData> {
|
|
final Value<int> id;
|
|
final Value<String> query;
|
|
final Value<double?> latitude;
|
|
final Value<double?> longitude;
|
|
final Value<int> timestamp;
|
|
const SearchHistoryCompanion({
|
|
this.id = const Value.absent(),
|
|
this.query = const Value.absent(),
|
|
this.latitude = const Value.absent(),
|
|
this.longitude = const Value.absent(),
|
|
this.timestamp = const Value.absent(),
|
|
});
|
|
SearchHistoryCompanion.insert({
|
|
this.id = const Value.absent(),
|
|
required String query,
|
|
this.latitude = const Value.absent(),
|
|
this.longitude = const Value.absent(),
|
|
required int timestamp,
|
|
}) : query = Value(query),
|
|
timestamp = Value(timestamp);
|
|
static Insertable<SearchHistoryData> custom({
|
|
Expression<int>? id,
|
|
Expression<String>? query,
|
|
Expression<double>? latitude,
|
|
Expression<double>? longitude,
|
|
Expression<int>? timestamp,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (query != null) 'query': query,
|
|
if (latitude != null) 'latitude': latitude,
|
|
if (longitude != null) 'longitude': longitude,
|
|
if (timestamp != null) 'timestamp': timestamp,
|
|
});
|
|
}
|
|
|
|
SearchHistoryCompanion copyWith({
|
|
Value<int>? id,
|
|
Value<String>? query,
|
|
Value<double?>? latitude,
|
|
Value<double?>? longitude,
|
|
Value<int>? timestamp,
|
|
}) {
|
|
return SearchHistoryCompanion(
|
|
id: id ?? this.id,
|
|
query: query ?? this.query,
|
|
latitude: latitude ?? this.latitude,
|
|
longitude: longitude ?? this.longitude,
|
|
timestamp: timestamp ?? this.timestamp,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (id.present) {
|
|
map['id'] = Variable<int>(id.value);
|
|
}
|
|
if (query.present) {
|
|
map['query'] = Variable<String>(query.value);
|
|
}
|
|
if (latitude.present) {
|
|
map['latitude'] = Variable<double>(latitude.value);
|
|
}
|
|
if (longitude.present) {
|
|
map['longitude'] = Variable<double>(longitude.value);
|
|
}
|
|
if (timestamp.present) {
|
|
map['timestamp'] = Variable<int>(timestamp.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('SearchHistoryCompanion(')
|
|
..write('id: $id, ')
|
|
..write('query: $query, ')
|
|
..write('latitude: $latitude, ')
|
|
..write('longitude: $longitude, ')
|
|
..write('timestamp: $timestamp')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $FavoritesTable extends Favorites
|
|
with TableInfo<$FavoritesTable, Favorite> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$FavoritesTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
|
@override
|
|
late final GeneratedColumn<int> id = GeneratedColumn<int>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
hasAutoIncrement: true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
|
'PRIMARY KEY AUTOINCREMENT',
|
|
),
|
|
);
|
|
static const VerificationMeta _osmIdMeta = const VerificationMeta('osmId');
|
|
@override
|
|
late final GeneratedColumn<int> osmId = GeneratedColumn<int>(
|
|
'osm_id',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _osmTypeMeta = const VerificationMeta(
|
|
'osmType',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<String> osmType = GeneratedColumn<String>(
|
|
'osm_type',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _nameMeta = const VerificationMeta('name');
|
|
@override
|
|
late final GeneratedColumn<String> name = GeneratedColumn<String>(
|
|
'name',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _noteMeta = const VerificationMeta('note');
|
|
@override
|
|
late final GeneratedColumn<String> note = GeneratedColumn<String>(
|
|
'note',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _groupNameMeta = const VerificationMeta(
|
|
'groupName',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<String> groupName = GeneratedColumn<String>(
|
|
'group_name',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
defaultValue: const Constant('Favorites'),
|
|
);
|
|
static const VerificationMeta _latitudeMeta = const VerificationMeta(
|
|
'latitude',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<double> latitude = GeneratedColumn<double>(
|
|
'latitude',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _longitudeMeta = const VerificationMeta(
|
|
'longitude',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<double> longitude = GeneratedColumn<double>(
|
|
'longitude',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _addressJsonMeta = const VerificationMeta(
|
|
'addressJson',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<String> addressJson = GeneratedColumn<String>(
|
|
'address_json',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
|
'createdAt',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _updatedAtMeta = const VerificationMeta(
|
|
'updatedAt',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<int> updatedAt = GeneratedColumn<int>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
osmId,
|
|
osmType,
|
|
name,
|
|
note,
|
|
groupName,
|
|
latitude,
|
|
longitude,
|
|
addressJson,
|
|
createdAt,
|
|
updatedAt,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'favorites';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<Favorite> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('id')) {
|
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
|
}
|
|
if (data.containsKey('osm_id')) {
|
|
context.handle(
|
|
_osmIdMeta,
|
|
osmId.isAcceptableOrUnknown(data['osm_id']!, _osmIdMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('osm_type')) {
|
|
context.handle(
|
|
_osmTypeMeta,
|
|
osmType.isAcceptableOrUnknown(data['osm_type']!, _osmTypeMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('name')) {
|
|
context.handle(
|
|
_nameMeta,
|
|
name.isAcceptableOrUnknown(data['name']!, _nameMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_nameMeta);
|
|
}
|
|
if (data.containsKey('note')) {
|
|
context.handle(
|
|
_noteMeta,
|
|
note.isAcceptableOrUnknown(data['note']!, _noteMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('group_name')) {
|
|
context.handle(
|
|
_groupNameMeta,
|
|
groupName.isAcceptableOrUnknown(data['group_name']!, _groupNameMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('latitude')) {
|
|
context.handle(
|
|
_latitudeMeta,
|
|
latitude.isAcceptableOrUnknown(data['latitude']!, _latitudeMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_latitudeMeta);
|
|
}
|
|
if (data.containsKey('longitude')) {
|
|
context.handle(
|
|
_longitudeMeta,
|
|
longitude.isAcceptableOrUnknown(data['longitude']!, _longitudeMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_longitudeMeta);
|
|
}
|
|
if (data.containsKey('address_json')) {
|
|
context.handle(
|
|
_addressJsonMeta,
|
|
addressJson.isAcceptableOrUnknown(
|
|
data['address_json']!,
|
|
_addressJsonMeta,
|
|
),
|
|
);
|
|
}
|
|
if (data.containsKey('created_at')) {
|
|
context.handle(
|
|
_createdAtMeta,
|
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_createdAtMeta);
|
|
}
|
|
if (data.containsKey('updated_at')) {
|
|
context.handle(
|
|
_updatedAtMeta,
|
|
updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_updatedAtMeta);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Favorite map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return Favorite(
|
|
id:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}id'],
|
|
)!,
|
|
osmId: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}osm_id'],
|
|
),
|
|
osmType: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}osm_type'],
|
|
),
|
|
name:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}name'],
|
|
)!,
|
|
note: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}note'],
|
|
),
|
|
groupName:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}group_name'],
|
|
)!,
|
|
latitude:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}latitude'],
|
|
)!,
|
|
longitude:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}longitude'],
|
|
)!,
|
|
addressJson: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}address_json'],
|
|
),
|
|
createdAt:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}created_at'],
|
|
)!,
|
|
updatedAt:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}updated_at'],
|
|
)!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$FavoritesTable createAlias(String alias) {
|
|
return $FavoritesTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class Favorite extends DataClass implements Insertable<Favorite> {
|
|
final int id;
|
|
final int? osmId;
|
|
final String? osmType;
|
|
final String name;
|
|
final String? note;
|
|
final String groupName;
|
|
final double latitude;
|
|
final double longitude;
|
|
final String? addressJson;
|
|
final int createdAt;
|
|
final int updatedAt;
|
|
const Favorite({
|
|
required this.id,
|
|
this.osmId,
|
|
this.osmType,
|
|
required this.name,
|
|
this.note,
|
|
required this.groupName,
|
|
required this.latitude,
|
|
required this.longitude,
|
|
this.addressJson,
|
|
required this.createdAt,
|
|
required this.updatedAt,
|
|
});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['id'] = Variable<int>(id);
|
|
if (!nullToAbsent || osmId != null) {
|
|
map['osm_id'] = Variable<int>(osmId);
|
|
}
|
|
if (!nullToAbsent || osmType != null) {
|
|
map['osm_type'] = Variable<String>(osmType);
|
|
}
|
|
map['name'] = Variable<String>(name);
|
|
if (!nullToAbsent || note != null) {
|
|
map['note'] = Variable<String>(note);
|
|
}
|
|
map['group_name'] = Variable<String>(groupName);
|
|
map['latitude'] = Variable<double>(latitude);
|
|
map['longitude'] = Variable<double>(longitude);
|
|
if (!nullToAbsent || addressJson != null) {
|
|
map['address_json'] = Variable<String>(addressJson);
|
|
}
|
|
map['created_at'] = Variable<int>(createdAt);
|
|
map['updated_at'] = Variable<int>(updatedAt);
|
|
return map;
|
|
}
|
|
|
|
FavoritesCompanion toCompanion(bool nullToAbsent) {
|
|
return FavoritesCompanion(
|
|
id: Value(id),
|
|
osmId:
|
|
osmId == null && nullToAbsent ? const Value.absent() : Value(osmId),
|
|
osmType:
|
|
osmType == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(osmType),
|
|
name: Value(name),
|
|
note: note == null && nullToAbsent ? const Value.absent() : Value(note),
|
|
groupName: Value(groupName),
|
|
latitude: Value(latitude),
|
|
longitude: Value(longitude),
|
|
addressJson:
|
|
addressJson == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(addressJson),
|
|
createdAt: Value(createdAt),
|
|
updatedAt: Value(updatedAt),
|
|
);
|
|
}
|
|
|
|
factory Favorite.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return Favorite(
|
|
id: serializer.fromJson<int>(json['id']),
|
|
osmId: serializer.fromJson<int?>(json['osmId']),
|
|
osmType: serializer.fromJson<String?>(json['osmType']),
|
|
name: serializer.fromJson<String>(json['name']),
|
|
note: serializer.fromJson<String?>(json['note']),
|
|
groupName: serializer.fromJson<String>(json['groupName']),
|
|
latitude: serializer.fromJson<double>(json['latitude']),
|
|
longitude: serializer.fromJson<double>(json['longitude']),
|
|
addressJson: serializer.fromJson<String?>(json['addressJson']),
|
|
createdAt: serializer.fromJson<int>(json['createdAt']),
|
|
updatedAt: serializer.fromJson<int>(json['updatedAt']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<int>(id),
|
|
'osmId': serializer.toJson<int?>(osmId),
|
|
'osmType': serializer.toJson<String?>(osmType),
|
|
'name': serializer.toJson<String>(name),
|
|
'note': serializer.toJson<String?>(note),
|
|
'groupName': serializer.toJson<String>(groupName),
|
|
'latitude': serializer.toJson<double>(latitude),
|
|
'longitude': serializer.toJson<double>(longitude),
|
|
'addressJson': serializer.toJson<String?>(addressJson),
|
|
'createdAt': serializer.toJson<int>(createdAt),
|
|
'updatedAt': serializer.toJson<int>(updatedAt),
|
|
};
|
|
}
|
|
|
|
Favorite copyWith({
|
|
int? id,
|
|
Value<int?> osmId = const Value.absent(),
|
|
Value<String?> osmType = const Value.absent(),
|
|
String? name,
|
|
Value<String?> note = const Value.absent(),
|
|
String? groupName,
|
|
double? latitude,
|
|
double? longitude,
|
|
Value<String?> addressJson = const Value.absent(),
|
|
int? createdAt,
|
|
int? updatedAt,
|
|
}) => Favorite(
|
|
id: id ?? this.id,
|
|
osmId: osmId.present ? osmId.value : this.osmId,
|
|
osmType: osmType.present ? osmType.value : this.osmType,
|
|
name: name ?? this.name,
|
|
note: note.present ? note.value : this.note,
|
|
groupName: groupName ?? this.groupName,
|
|
latitude: latitude ?? this.latitude,
|
|
longitude: longitude ?? this.longitude,
|
|
addressJson: addressJson.present ? addressJson.value : this.addressJson,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
updatedAt: updatedAt ?? this.updatedAt,
|
|
);
|
|
Favorite copyWithCompanion(FavoritesCompanion data) {
|
|
return Favorite(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
osmId: data.osmId.present ? data.osmId.value : this.osmId,
|
|
osmType: data.osmType.present ? data.osmType.value : this.osmType,
|
|
name: data.name.present ? data.name.value : this.name,
|
|
note: data.note.present ? data.note.value : this.note,
|
|
groupName: data.groupName.present ? data.groupName.value : this.groupName,
|
|
latitude: data.latitude.present ? data.latitude.value : this.latitude,
|
|
longitude: data.longitude.present ? data.longitude.value : this.longitude,
|
|
addressJson:
|
|
data.addressJson.present ? data.addressJson.value : this.addressJson,
|
|
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
|
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('Favorite(')
|
|
..write('id: $id, ')
|
|
..write('osmId: $osmId, ')
|
|
..write('osmType: $osmType, ')
|
|
..write('name: $name, ')
|
|
..write('note: $note, ')
|
|
..write('groupName: $groupName, ')
|
|
..write('latitude: $latitude, ')
|
|
..write('longitude: $longitude, ')
|
|
..write('addressJson: $addressJson, ')
|
|
..write('createdAt: $createdAt, ')
|
|
..write('updatedAt: $updatedAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
id,
|
|
osmId,
|
|
osmType,
|
|
name,
|
|
note,
|
|
groupName,
|
|
latitude,
|
|
longitude,
|
|
addressJson,
|
|
createdAt,
|
|
updatedAt,
|
|
);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is Favorite &&
|
|
other.id == this.id &&
|
|
other.osmId == this.osmId &&
|
|
other.osmType == this.osmType &&
|
|
other.name == this.name &&
|
|
other.note == this.note &&
|
|
other.groupName == this.groupName &&
|
|
other.latitude == this.latitude &&
|
|
other.longitude == this.longitude &&
|
|
other.addressJson == this.addressJson &&
|
|
other.createdAt == this.createdAt &&
|
|
other.updatedAt == this.updatedAt);
|
|
}
|
|
|
|
class FavoritesCompanion extends UpdateCompanion<Favorite> {
|
|
final Value<int> id;
|
|
final Value<int?> osmId;
|
|
final Value<String?> osmType;
|
|
final Value<String> name;
|
|
final Value<String?> note;
|
|
final Value<String> groupName;
|
|
final Value<double> latitude;
|
|
final Value<double> longitude;
|
|
final Value<String?> addressJson;
|
|
final Value<int> createdAt;
|
|
final Value<int> updatedAt;
|
|
const FavoritesCompanion({
|
|
this.id = const Value.absent(),
|
|
this.osmId = const Value.absent(),
|
|
this.osmType = const Value.absent(),
|
|
this.name = const Value.absent(),
|
|
this.note = const Value.absent(),
|
|
this.groupName = const Value.absent(),
|
|
this.latitude = const Value.absent(),
|
|
this.longitude = const Value.absent(),
|
|
this.addressJson = const Value.absent(),
|
|
this.createdAt = const Value.absent(),
|
|
this.updatedAt = const Value.absent(),
|
|
});
|
|
FavoritesCompanion.insert({
|
|
this.id = const Value.absent(),
|
|
this.osmId = const Value.absent(),
|
|
this.osmType = const Value.absent(),
|
|
required String name,
|
|
this.note = const Value.absent(),
|
|
this.groupName = const Value.absent(),
|
|
required double latitude,
|
|
required double longitude,
|
|
this.addressJson = const Value.absent(),
|
|
required int createdAt,
|
|
required int updatedAt,
|
|
}) : name = Value(name),
|
|
latitude = Value(latitude),
|
|
longitude = Value(longitude),
|
|
createdAt = Value(createdAt),
|
|
updatedAt = Value(updatedAt);
|
|
static Insertable<Favorite> custom({
|
|
Expression<int>? id,
|
|
Expression<int>? osmId,
|
|
Expression<String>? osmType,
|
|
Expression<String>? name,
|
|
Expression<String>? note,
|
|
Expression<String>? groupName,
|
|
Expression<double>? latitude,
|
|
Expression<double>? longitude,
|
|
Expression<String>? addressJson,
|
|
Expression<int>? createdAt,
|
|
Expression<int>? updatedAt,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (osmId != null) 'osm_id': osmId,
|
|
if (osmType != null) 'osm_type': osmType,
|
|
if (name != null) 'name': name,
|
|
if (note != null) 'note': note,
|
|
if (groupName != null) 'group_name': groupName,
|
|
if (latitude != null) 'latitude': latitude,
|
|
if (longitude != null) 'longitude': longitude,
|
|
if (addressJson != null) 'address_json': addressJson,
|
|
if (createdAt != null) 'created_at': createdAt,
|
|
if (updatedAt != null) 'updated_at': updatedAt,
|
|
});
|
|
}
|
|
|
|
FavoritesCompanion copyWith({
|
|
Value<int>? id,
|
|
Value<int?>? osmId,
|
|
Value<String?>? osmType,
|
|
Value<String>? name,
|
|
Value<String?>? note,
|
|
Value<String>? groupName,
|
|
Value<double>? latitude,
|
|
Value<double>? longitude,
|
|
Value<String?>? addressJson,
|
|
Value<int>? createdAt,
|
|
Value<int>? updatedAt,
|
|
}) {
|
|
return FavoritesCompanion(
|
|
id: id ?? this.id,
|
|
osmId: osmId ?? this.osmId,
|
|
osmType: osmType ?? this.osmType,
|
|
name: name ?? this.name,
|
|
note: note ?? this.note,
|
|
groupName: groupName ?? this.groupName,
|
|
latitude: latitude ?? this.latitude,
|
|
longitude: longitude ?? this.longitude,
|
|
addressJson: addressJson ?? this.addressJson,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
updatedAt: updatedAt ?? this.updatedAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (id.present) {
|
|
map['id'] = Variable<int>(id.value);
|
|
}
|
|
if (osmId.present) {
|
|
map['osm_id'] = Variable<int>(osmId.value);
|
|
}
|
|
if (osmType.present) {
|
|
map['osm_type'] = Variable<String>(osmType.value);
|
|
}
|
|
if (name.present) {
|
|
map['name'] = Variable<String>(name.value);
|
|
}
|
|
if (note.present) {
|
|
map['note'] = Variable<String>(note.value);
|
|
}
|
|
if (groupName.present) {
|
|
map['group_name'] = Variable<String>(groupName.value);
|
|
}
|
|
if (latitude.present) {
|
|
map['latitude'] = Variable<double>(latitude.value);
|
|
}
|
|
if (longitude.present) {
|
|
map['longitude'] = Variable<double>(longitude.value);
|
|
}
|
|
if (addressJson.present) {
|
|
map['address_json'] = Variable<String>(addressJson.value);
|
|
}
|
|
if (createdAt.present) {
|
|
map['created_at'] = Variable<int>(createdAt.value);
|
|
}
|
|
if (updatedAt.present) {
|
|
map['updated_at'] = Variable<int>(updatedAt.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('FavoritesCompanion(')
|
|
..write('id: $id, ')
|
|
..write('osmId: $osmId, ')
|
|
..write('osmType: $osmType, ')
|
|
..write('name: $name, ')
|
|
..write('note: $note, ')
|
|
..write('groupName: $groupName, ')
|
|
..write('latitude: $latitude, ')
|
|
..write('longitude: $longitude, ')
|
|
..write('addressJson: $addressJson, ')
|
|
..write('createdAt: $createdAt, ')
|
|
..write('updatedAt: $updatedAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $OfflineRegionsTable extends OfflineRegions
|
|
with TableInfo<$OfflineRegionsTable, OfflineRegion> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$OfflineRegionsTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
|
@override
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _nameMeta = const VerificationMeta('name');
|
|
@override
|
|
late final GeneratedColumn<String> name = GeneratedColumn<String>(
|
|
'name',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _minLatMeta = const VerificationMeta('minLat');
|
|
@override
|
|
late final GeneratedColumn<double> minLat = GeneratedColumn<double>(
|
|
'min_lat',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _minLonMeta = const VerificationMeta('minLon');
|
|
@override
|
|
late final GeneratedColumn<double> minLon = GeneratedColumn<double>(
|
|
'min_lon',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _maxLatMeta = const VerificationMeta('maxLat');
|
|
@override
|
|
late final GeneratedColumn<double> maxLat = GeneratedColumn<double>(
|
|
'max_lat',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _maxLonMeta = const VerificationMeta('maxLon');
|
|
@override
|
|
late final GeneratedColumn<double> maxLon = GeneratedColumn<double>(
|
|
'max_lon',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _tilesSizeBytesMeta = const VerificationMeta(
|
|
'tilesSizeBytes',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<int> tilesSizeBytes = GeneratedColumn<int>(
|
|
'tiles_size_bytes',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _routingSizeBytesMeta = const VerificationMeta(
|
|
'routingSizeBytes',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<int> routingSizeBytes = GeneratedColumn<int>(
|
|
'routing_size_bytes',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _poisSizeBytesMeta = const VerificationMeta(
|
|
'poisSizeBytes',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<int> poisSizeBytes = GeneratedColumn<int>(
|
|
'pois_size_bytes',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _downloadedAtMeta = const VerificationMeta(
|
|
'downloadedAt',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<int> downloadedAt = GeneratedColumn<int>(
|
|
'downloaded_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _lastUpdatedMeta = const VerificationMeta(
|
|
'lastUpdated',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<int> lastUpdated = GeneratedColumn<int>(
|
|
'last_updated',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
name,
|
|
minLat,
|
|
minLon,
|
|
maxLat,
|
|
maxLon,
|
|
tilesSizeBytes,
|
|
routingSizeBytes,
|
|
poisSizeBytes,
|
|
downloadedAt,
|
|
lastUpdated,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'offline_regions';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<OfflineRegion> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('id')) {
|
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_idMeta);
|
|
}
|
|
if (data.containsKey('name')) {
|
|
context.handle(
|
|
_nameMeta,
|
|
name.isAcceptableOrUnknown(data['name']!, _nameMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_nameMeta);
|
|
}
|
|
if (data.containsKey('min_lat')) {
|
|
context.handle(
|
|
_minLatMeta,
|
|
minLat.isAcceptableOrUnknown(data['min_lat']!, _minLatMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_minLatMeta);
|
|
}
|
|
if (data.containsKey('min_lon')) {
|
|
context.handle(
|
|
_minLonMeta,
|
|
minLon.isAcceptableOrUnknown(data['min_lon']!, _minLonMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_minLonMeta);
|
|
}
|
|
if (data.containsKey('max_lat')) {
|
|
context.handle(
|
|
_maxLatMeta,
|
|
maxLat.isAcceptableOrUnknown(data['max_lat']!, _maxLatMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_maxLatMeta);
|
|
}
|
|
if (data.containsKey('max_lon')) {
|
|
context.handle(
|
|
_maxLonMeta,
|
|
maxLon.isAcceptableOrUnknown(data['max_lon']!, _maxLonMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_maxLonMeta);
|
|
}
|
|
if (data.containsKey('tiles_size_bytes')) {
|
|
context.handle(
|
|
_tilesSizeBytesMeta,
|
|
tilesSizeBytes.isAcceptableOrUnknown(
|
|
data['tiles_size_bytes']!,
|
|
_tilesSizeBytesMeta,
|
|
),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_tilesSizeBytesMeta);
|
|
}
|
|
if (data.containsKey('routing_size_bytes')) {
|
|
context.handle(
|
|
_routingSizeBytesMeta,
|
|
routingSizeBytes.isAcceptableOrUnknown(
|
|
data['routing_size_bytes']!,
|
|
_routingSizeBytesMeta,
|
|
),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_routingSizeBytesMeta);
|
|
}
|
|
if (data.containsKey('pois_size_bytes')) {
|
|
context.handle(
|
|
_poisSizeBytesMeta,
|
|
poisSizeBytes.isAcceptableOrUnknown(
|
|
data['pois_size_bytes']!,
|
|
_poisSizeBytesMeta,
|
|
),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_poisSizeBytesMeta);
|
|
}
|
|
if (data.containsKey('downloaded_at')) {
|
|
context.handle(
|
|
_downloadedAtMeta,
|
|
downloadedAt.isAcceptableOrUnknown(
|
|
data['downloaded_at']!,
|
|
_downloadedAtMeta,
|
|
),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_downloadedAtMeta);
|
|
}
|
|
if (data.containsKey('last_updated')) {
|
|
context.handle(
|
|
_lastUpdatedMeta,
|
|
lastUpdated.isAcceptableOrUnknown(
|
|
data['last_updated']!,
|
|
_lastUpdatedMeta,
|
|
),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_lastUpdatedMeta);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
OfflineRegion map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return OfflineRegion(
|
|
id:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}id'],
|
|
)!,
|
|
name:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}name'],
|
|
)!,
|
|
minLat:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}min_lat'],
|
|
)!,
|
|
minLon:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}min_lon'],
|
|
)!,
|
|
maxLat:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}max_lat'],
|
|
)!,
|
|
maxLon:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}max_lon'],
|
|
)!,
|
|
tilesSizeBytes:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}tiles_size_bytes'],
|
|
)!,
|
|
routingSizeBytes:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}routing_size_bytes'],
|
|
)!,
|
|
poisSizeBytes:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}pois_size_bytes'],
|
|
)!,
|
|
downloadedAt:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}downloaded_at'],
|
|
)!,
|
|
lastUpdated:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}last_updated'],
|
|
)!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$OfflineRegionsTable createAlias(String alias) {
|
|
return $OfflineRegionsTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class OfflineRegion extends DataClass implements Insertable<OfflineRegion> {
|
|
final String id;
|
|
final String name;
|
|
final double minLat;
|
|
final double minLon;
|
|
final double maxLat;
|
|
final double maxLon;
|
|
final int tilesSizeBytes;
|
|
final int routingSizeBytes;
|
|
final int poisSizeBytes;
|
|
final int downloadedAt;
|
|
final int lastUpdated;
|
|
const OfflineRegion({
|
|
required this.id,
|
|
required this.name,
|
|
required this.minLat,
|
|
required this.minLon,
|
|
required this.maxLat,
|
|
required this.maxLon,
|
|
required this.tilesSizeBytes,
|
|
required this.routingSizeBytes,
|
|
required this.poisSizeBytes,
|
|
required this.downloadedAt,
|
|
required this.lastUpdated,
|
|
});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['id'] = Variable<String>(id);
|
|
map['name'] = Variable<String>(name);
|
|
map['min_lat'] = Variable<double>(minLat);
|
|
map['min_lon'] = Variable<double>(minLon);
|
|
map['max_lat'] = Variable<double>(maxLat);
|
|
map['max_lon'] = Variable<double>(maxLon);
|
|
map['tiles_size_bytes'] = Variable<int>(tilesSizeBytes);
|
|
map['routing_size_bytes'] = Variable<int>(routingSizeBytes);
|
|
map['pois_size_bytes'] = Variable<int>(poisSizeBytes);
|
|
map['downloaded_at'] = Variable<int>(downloadedAt);
|
|
map['last_updated'] = Variable<int>(lastUpdated);
|
|
return map;
|
|
}
|
|
|
|
OfflineRegionsCompanion toCompanion(bool nullToAbsent) {
|
|
return OfflineRegionsCompanion(
|
|
id: Value(id),
|
|
name: Value(name),
|
|
minLat: Value(minLat),
|
|
minLon: Value(minLon),
|
|
maxLat: Value(maxLat),
|
|
maxLon: Value(maxLon),
|
|
tilesSizeBytes: Value(tilesSizeBytes),
|
|
routingSizeBytes: Value(routingSizeBytes),
|
|
poisSizeBytes: Value(poisSizeBytes),
|
|
downloadedAt: Value(downloadedAt),
|
|
lastUpdated: Value(lastUpdated),
|
|
);
|
|
}
|
|
|
|
factory OfflineRegion.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return OfflineRegion(
|
|
id: serializer.fromJson<String>(json['id']),
|
|
name: serializer.fromJson<String>(json['name']),
|
|
minLat: serializer.fromJson<double>(json['minLat']),
|
|
minLon: serializer.fromJson<double>(json['minLon']),
|
|
maxLat: serializer.fromJson<double>(json['maxLat']),
|
|
maxLon: serializer.fromJson<double>(json['maxLon']),
|
|
tilesSizeBytes: serializer.fromJson<int>(json['tilesSizeBytes']),
|
|
routingSizeBytes: serializer.fromJson<int>(json['routingSizeBytes']),
|
|
poisSizeBytes: serializer.fromJson<int>(json['poisSizeBytes']),
|
|
downloadedAt: serializer.fromJson<int>(json['downloadedAt']),
|
|
lastUpdated: serializer.fromJson<int>(json['lastUpdated']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<String>(id),
|
|
'name': serializer.toJson<String>(name),
|
|
'minLat': serializer.toJson<double>(minLat),
|
|
'minLon': serializer.toJson<double>(minLon),
|
|
'maxLat': serializer.toJson<double>(maxLat),
|
|
'maxLon': serializer.toJson<double>(maxLon),
|
|
'tilesSizeBytes': serializer.toJson<int>(tilesSizeBytes),
|
|
'routingSizeBytes': serializer.toJson<int>(routingSizeBytes),
|
|
'poisSizeBytes': serializer.toJson<int>(poisSizeBytes),
|
|
'downloadedAt': serializer.toJson<int>(downloadedAt),
|
|
'lastUpdated': serializer.toJson<int>(lastUpdated),
|
|
};
|
|
}
|
|
|
|
OfflineRegion copyWith({
|
|
String? id,
|
|
String? name,
|
|
double? minLat,
|
|
double? minLon,
|
|
double? maxLat,
|
|
double? maxLon,
|
|
int? tilesSizeBytes,
|
|
int? routingSizeBytes,
|
|
int? poisSizeBytes,
|
|
int? downloadedAt,
|
|
int? lastUpdated,
|
|
}) => OfflineRegion(
|
|
id: id ?? this.id,
|
|
name: name ?? this.name,
|
|
minLat: minLat ?? this.minLat,
|
|
minLon: minLon ?? this.minLon,
|
|
maxLat: maxLat ?? this.maxLat,
|
|
maxLon: maxLon ?? this.maxLon,
|
|
tilesSizeBytes: tilesSizeBytes ?? this.tilesSizeBytes,
|
|
routingSizeBytes: routingSizeBytes ?? this.routingSizeBytes,
|
|
poisSizeBytes: poisSizeBytes ?? this.poisSizeBytes,
|
|
downloadedAt: downloadedAt ?? this.downloadedAt,
|
|
lastUpdated: lastUpdated ?? this.lastUpdated,
|
|
);
|
|
OfflineRegion copyWithCompanion(OfflineRegionsCompanion data) {
|
|
return OfflineRegion(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
name: data.name.present ? data.name.value : this.name,
|
|
minLat: data.minLat.present ? data.minLat.value : this.minLat,
|
|
minLon: data.minLon.present ? data.minLon.value : this.minLon,
|
|
maxLat: data.maxLat.present ? data.maxLat.value : this.maxLat,
|
|
maxLon: data.maxLon.present ? data.maxLon.value : this.maxLon,
|
|
tilesSizeBytes:
|
|
data.tilesSizeBytes.present
|
|
? data.tilesSizeBytes.value
|
|
: this.tilesSizeBytes,
|
|
routingSizeBytes:
|
|
data.routingSizeBytes.present
|
|
? data.routingSizeBytes.value
|
|
: this.routingSizeBytes,
|
|
poisSizeBytes:
|
|
data.poisSizeBytes.present
|
|
? data.poisSizeBytes.value
|
|
: this.poisSizeBytes,
|
|
downloadedAt:
|
|
data.downloadedAt.present
|
|
? data.downloadedAt.value
|
|
: this.downloadedAt,
|
|
lastUpdated:
|
|
data.lastUpdated.present ? data.lastUpdated.value : this.lastUpdated,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('OfflineRegion(')
|
|
..write('id: $id, ')
|
|
..write('name: $name, ')
|
|
..write('minLat: $minLat, ')
|
|
..write('minLon: $minLon, ')
|
|
..write('maxLat: $maxLat, ')
|
|
..write('maxLon: $maxLon, ')
|
|
..write('tilesSizeBytes: $tilesSizeBytes, ')
|
|
..write('routingSizeBytes: $routingSizeBytes, ')
|
|
..write('poisSizeBytes: $poisSizeBytes, ')
|
|
..write('downloadedAt: $downloadedAt, ')
|
|
..write('lastUpdated: $lastUpdated')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
id,
|
|
name,
|
|
minLat,
|
|
minLon,
|
|
maxLat,
|
|
maxLon,
|
|
tilesSizeBytes,
|
|
routingSizeBytes,
|
|
poisSizeBytes,
|
|
downloadedAt,
|
|
lastUpdated,
|
|
);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is OfflineRegion &&
|
|
other.id == this.id &&
|
|
other.name == this.name &&
|
|
other.minLat == this.minLat &&
|
|
other.minLon == this.minLon &&
|
|
other.maxLat == this.maxLat &&
|
|
other.maxLon == this.maxLon &&
|
|
other.tilesSizeBytes == this.tilesSizeBytes &&
|
|
other.routingSizeBytes == this.routingSizeBytes &&
|
|
other.poisSizeBytes == this.poisSizeBytes &&
|
|
other.downloadedAt == this.downloadedAt &&
|
|
other.lastUpdated == this.lastUpdated);
|
|
}
|
|
|
|
class OfflineRegionsCompanion extends UpdateCompanion<OfflineRegion> {
|
|
final Value<String> id;
|
|
final Value<String> name;
|
|
final Value<double> minLat;
|
|
final Value<double> minLon;
|
|
final Value<double> maxLat;
|
|
final Value<double> maxLon;
|
|
final Value<int> tilesSizeBytes;
|
|
final Value<int> routingSizeBytes;
|
|
final Value<int> poisSizeBytes;
|
|
final Value<int> downloadedAt;
|
|
final Value<int> lastUpdated;
|
|
final Value<int> rowid;
|
|
const OfflineRegionsCompanion({
|
|
this.id = const Value.absent(),
|
|
this.name = const Value.absent(),
|
|
this.minLat = const Value.absent(),
|
|
this.minLon = const Value.absent(),
|
|
this.maxLat = const Value.absent(),
|
|
this.maxLon = const Value.absent(),
|
|
this.tilesSizeBytes = const Value.absent(),
|
|
this.routingSizeBytes = const Value.absent(),
|
|
this.poisSizeBytes = const Value.absent(),
|
|
this.downloadedAt = const Value.absent(),
|
|
this.lastUpdated = const Value.absent(),
|
|
this.rowid = const Value.absent(),
|
|
});
|
|
OfflineRegionsCompanion.insert({
|
|
required String id,
|
|
required String name,
|
|
required double minLat,
|
|
required double minLon,
|
|
required double maxLat,
|
|
required double maxLon,
|
|
required int tilesSizeBytes,
|
|
required int routingSizeBytes,
|
|
required int poisSizeBytes,
|
|
required int downloadedAt,
|
|
required int lastUpdated,
|
|
this.rowid = const Value.absent(),
|
|
}) : id = Value(id),
|
|
name = Value(name),
|
|
minLat = Value(minLat),
|
|
minLon = Value(minLon),
|
|
maxLat = Value(maxLat),
|
|
maxLon = Value(maxLon),
|
|
tilesSizeBytes = Value(tilesSizeBytes),
|
|
routingSizeBytes = Value(routingSizeBytes),
|
|
poisSizeBytes = Value(poisSizeBytes),
|
|
downloadedAt = Value(downloadedAt),
|
|
lastUpdated = Value(lastUpdated);
|
|
static Insertable<OfflineRegion> custom({
|
|
Expression<String>? id,
|
|
Expression<String>? name,
|
|
Expression<double>? minLat,
|
|
Expression<double>? minLon,
|
|
Expression<double>? maxLat,
|
|
Expression<double>? maxLon,
|
|
Expression<int>? tilesSizeBytes,
|
|
Expression<int>? routingSizeBytes,
|
|
Expression<int>? poisSizeBytes,
|
|
Expression<int>? downloadedAt,
|
|
Expression<int>? lastUpdated,
|
|
Expression<int>? rowid,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (name != null) 'name': name,
|
|
if (minLat != null) 'min_lat': minLat,
|
|
if (minLon != null) 'min_lon': minLon,
|
|
if (maxLat != null) 'max_lat': maxLat,
|
|
if (maxLon != null) 'max_lon': maxLon,
|
|
if (tilesSizeBytes != null) 'tiles_size_bytes': tilesSizeBytes,
|
|
if (routingSizeBytes != null) 'routing_size_bytes': routingSizeBytes,
|
|
if (poisSizeBytes != null) 'pois_size_bytes': poisSizeBytes,
|
|
if (downloadedAt != null) 'downloaded_at': downloadedAt,
|
|
if (lastUpdated != null) 'last_updated': lastUpdated,
|
|
if (rowid != null) 'rowid': rowid,
|
|
});
|
|
}
|
|
|
|
OfflineRegionsCompanion copyWith({
|
|
Value<String>? id,
|
|
Value<String>? name,
|
|
Value<double>? minLat,
|
|
Value<double>? minLon,
|
|
Value<double>? maxLat,
|
|
Value<double>? maxLon,
|
|
Value<int>? tilesSizeBytes,
|
|
Value<int>? routingSizeBytes,
|
|
Value<int>? poisSizeBytes,
|
|
Value<int>? downloadedAt,
|
|
Value<int>? lastUpdated,
|
|
Value<int>? rowid,
|
|
}) {
|
|
return OfflineRegionsCompanion(
|
|
id: id ?? this.id,
|
|
name: name ?? this.name,
|
|
minLat: minLat ?? this.minLat,
|
|
minLon: minLon ?? this.minLon,
|
|
maxLat: maxLat ?? this.maxLat,
|
|
maxLon: maxLon ?? this.maxLon,
|
|
tilesSizeBytes: tilesSizeBytes ?? this.tilesSizeBytes,
|
|
routingSizeBytes: routingSizeBytes ?? this.routingSizeBytes,
|
|
poisSizeBytes: poisSizeBytes ?? this.poisSizeBytes,
|
|
downloadedAt: downloadedAt ?? this.downloadedAt,
|
|
lastUpdated: lastUpdated ?? this.lastUpdated,
|
|
rowid: rowid ?? this.rowid,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (id.present) {
|
|
map['id'] = Variable<String>(id.value);
|
|
}
|
|
if (name.present) {
|
|
map['name'] = Variable<String>(name.value);
|
|
}
|
|
if (minLat.present) {
|
|
map['min_lat'] = Variable<double>(minLat.value);
|
|
}
|
|
if (minLon.present) {
|
|
map['min_lon'] = Variable<double>(minLon.value);
|
|
}
|
|
if (maxLat.present) {
|
|
map['max_lat'] = Variable<double>(maxLat.value);
|
|
}
|
|
if (maxLon.present) {
|
|
map['max_lon'] = Variable<double>(maxLon.value);
|
|
}
|
|
if (tilesSizeBytes.present) {
|
|
map['tiles_size_bytes'] = Variable<int>(tilesSizeBytes.value);
|
|
}
|
|
if (routingSizeBytes.present) {
|
|
map['routing_size_bytes'] = Variable<int>(routingSizeBytes.value);
|
|
}
|
|
if (poisSizeBytes.present) {
|
|
map['pois_size_bytes'] = Variable<int>(poisSizeBytes.value);
|
|
}
|
|
if (downloadedAt.present) {
|
|
map['downloaded_at'] = Variable<int>(downloadedAt.value);
|
|
}
|
|
if (lastUpdated.present) {
|
|
map['last_updated'] = Variable<int>(lastUpdated.value);
|
|
}
|
|
if (rowid.present) {
|
|
map['rowid'] = Variable<int>(rowid.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('OfflineRegionsCompanion(')
|
|
..write('id: $id, ')
|
|
..write('name: $name, ')
|
|
..write('minLat: $minLat, ')
|
|
..write('minLon: $minLon, ')
|
|
..write('maxLat: $maxLat, ')
|
|
..write('maxLon: $maxLon, ')
|
|
..write('tilesSizeBytes: $tilesSizeBytes, ')
|
|
..write('routingSizeBytes: $routingSizeBytes, ')
|
|
..write('poisSizeBytes: $poisSizeBytes, ')
|
|
..write('downloadedAt: $downloadedAt, ')
|
|
..write('lastUpdated: $lastUpdated, ')
|
|
..write('rowid: $rowid')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $SettingsTable extends Settings with TableInfo<$SettingsTable, Setting> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$SettingsTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _keyMeta = const VerificationMeta('key');
|
|
@override
|
|
late final GeneratedColumn<String> key = GeneratedColumn<String>(
|
|
'key',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _valueMeta = const VerificationMeta('value');
|
|
@override
|
|
late final GeneratedColumn<String> value = GeneratedColumn<String>(
|
|
'value',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [key, value];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'settings';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<Setting> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('key')) {
|
|
context.handle(
|
|
_keyMeta,
|
|
key.isAcceptableOrUnknown(data['key']!, _keyMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_keyMeta);
|
|
}
|
|
if (data.containsKey('value')) {
|
|
context.handle(
|
|
_valueMeta,
|
|
value.isAcceptableOrUnknown(data['value']!, _valueMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_valueMeta);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {key};
|
|
@override
|
|
Setting map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return Setting(
|
|
key:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}key'],
|
|
)!,
|
|
value:
|
|
attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}value'],
|
|
)!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$SettingsTable createAlias(String alias) {
|
|
return $SettingsTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class Setting extends DataClass implements Insertable<Setting> {
|
|
final String key;
|
|
final String value;
|
|
const Setting({required this.key, required this.value});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['key'] = Variable<String>(key);
|
|
map['value'] = Variable<String>(value);
|
|
return map;
|
|
}
|
|
|
|
SettingsCompanion toCompanion(bool nullToAbsent) {
|
|
return SettingsCompanion(key: Value(key), value: Value(value));
|
|
}
|
|
|
|
factory Setting.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return Setting(
|
|
key: serializer.fromJson<String>(json['key']),
|
|
value: serializer.fromJson<String>(json['value']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'key': serializer.toJson<String>(key),
|
|
'value': serializer.toJson<String>(value),
|
|
};
|
|
}
|
|
|
|
Setting copyWith({String? key, String? value}) =>
|
|
Setting(key: key ?? this.key, value: value ?? this.value);
|
|
Setting copyWithCompanion(SettingsCompanion data) {
|
|
return Setting(
|
|
key: data.key.present ? data.key.value : this.key,
|
|
value: data.value.present ? data.value.value : this.value,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('Setting(')
|
|
..write('key: $key, ')
|
|
..write('value: $value')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(key, value);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is Setting && other.key == this.key && other.value == this.value);
|
|
}
|
|
|
|
class SettingsCompanion extends UpdateCompanion<Setting> {
|
|
final Value<String> key;
|
|
final Value<String> value;
|
|
final Value<int> rowid;
|
|
const SettingsCompanion({
|
|
this.key = const Value.absent(),
|
|
this.value = const Value.absent(),
|
|
this.rowid = const Value.absent(),
|
|
});
|
|
SettingsCompanion.insert({
|
|
required String key,
|
|
required String value,
|
|
this.rowid = const Value.absent(),
|
|
}) : key = Value(key),
|
|
value = Value(value);
|
|
static Insertable<Setting> custom({
|
|
Expression<String>? key,
|
|
Expression<String>? value,
|
|
Expression<int>? rowid,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (key != null) 'key': key,
|
|
if (value != null) 'value': value,
|
|
if (rowid != null) 'rowid': rowid,
|
|
});
|
|
}
|
|
|
|
SettingsCompanion copyWith({
|
|
Value<String>? key,
|
|
Value<String>? value,
|
|
Value<int>? rowid,
|
|
}) {
|
|
return SettingsCompanion(
|
|
key: key ?? this.key,
|
|
value: value ?? this.value,
|
|
rowid: rowid ?? this.rowid,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (key.present) {
|
|
map['key'] = Variable<String>(key.value);
|
|
}
|
|
if (value.present) {
|
|
map['value'] = Variable<String>(value.value);
|
|
}
|
|
if (rowid.present) {
|
|
map['rowid'] = Variable<int>(rowid.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('SettingsCompanion(')
|
|
..write('key: $key, ')
|
|
..write('value: $value, ')
|
|
..write('rowid: $rowid')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
abstract class _$AppDatabase extends GeneratedDatabase {
|
|
_$AppDatabase(QueryExecutor e) : super(e);
|
|
$AppDatabaseManager get managers => $AppDatabaseManager(this);
|
|
late final $SearchHistoryTable searchHistory = $SearchHistoryTable(this);
|
|
late final $FavoritesTable favorites = $FavoritesTable(this);
|
|
late final $OfflineRegionsTable offlineRegions = $OfflineRegionsTable(this);
|
|
late final $SettingsTable settings = $SettingsTable(this);
|
|
@override
|
|
Iterable<TableInfo<Table, Object?>> get allTables =>
|
|
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
|
|
@override
|
|
List<DatabaseSchemaEntity> get allSchemaEntities => [
|
|
searchHistory,
|
|
favorites,
|
|
offlineRegions,
|
|
settings,
|
|
];
|
|
}
|
|
|
|
typedef $$SearchHistoryTableCreateCompanionBuilder =
|
|
SearchHistoryCompanion Function({
|
|
Value<int> id,
|
|
required String query,
|
|
Value<double?> latitude,
|
|
Value<double?> longitude,
|
|
required int timestamp,
|
|
});
|
|
typedef $$SearchHistoryTableUpdateCompanionBuilder =
|
|
SearchHistoryCompanion Function({
|
|
Value<int> id,
|
|
Value<String> query,
|
|
Value<double?> latitude,
|
|
Value<double?> longitude,
|
|
Value<int> timestamp,
|
|
});
|
|
|
|
class $$SearchHistoryTableFilterComposer
|
|
extends Composer<_$AppDatabase, $SearchHistoryTable> {
|
|
$$SearchHistoryTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get query => $composableBuilder(
|
|
column: $table.query,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get latitude => $composableBuilder(
|
|
column: $table.latitude,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get longitude => $composableBuilder(
|
|
column: $table.longitude,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get timestamp => $composableBuilder(
|
|
column: $table.timestamp,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$SearchHistoryTableOrderingComposer
|
|
extends Composer<_$AppDatabase, $SearchHistoryTable> {
|
|
$$SearchHistoryTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get query => $composableBuilder(
|
|
column: $table.query,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get latitude => $composableBuilder(
|
|
column: $table.latitude,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get longitude => $composableBuilder(
|
|
column: $table.longitude,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get timestamp => $composableBuilder(
|
|
column: $table.timestamp,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$SearchHistoryTableAnnotationComposer
|
|
extends Composer<_$AppDatabase, $SearchHistoryTable> {
|
|
$$SearchHistoryTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<int> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get query =>
|
|
$composableBuilder(column: $table.query, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get latitude =>
|
|
$composableBuilder(column: $table.latitude, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get longitude =>
|
|
$composableBuilder(column: $table.longitude, builder: (column) => column);
|
|
|
|
GeneratedColumn<int> get timestamp =>
|
|
$composableBuilder(column: $table.timestamp, builder: (column) => column);
|
|
}
|
|
|
|
class $$SearchHistoryTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$AppDatabase,
|
|
$SearchHistoryTable,
|
|
SearchHistoryData,
|
|
$$SearchHistoryTableFilterComposer,
|
|
$$SearchHistoryTableOrderingComposer,
|
|
$$SearchHistoryTableAnnotationComposer,
|
|
$$SearchHistoryTableCreateCompanionBuilder,
|
|
$$SearchHistoryTableUpdateCompanionBuilder,
|
|
(
|
|
SearchHistoryData,
|
|
BaseReferences<
|
|
_$AppDatabase,
|
|
$SearchHistoryTable,
|
|
SearchHistoryData
|
|
>,
|
|
),
|
|
SearchHistoryData,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$SearchHistoryTableTableManager(_$AppDatabase db, $SearchHistoryTable table)
|
|
: super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer:
|
|
() => $$SearchHistoryTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer:
|
|
() =>
|
|
$$SearchHistoryTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer:
|
|
() => $$SearchHistoryTableAnnotationComposer(
|
|
$db: db,
|
|
$table: table,
|
|
),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
Value<String> query = const Value.absent(),
|
|
Value<double?> latitude = const Value.absent(),
|
|
Value<double?> longitude = const Value.absent(),
|
|
Value<int> timestamp = const Value.absent(),
|
|
}) => SearchHistoryCompanion(
|
|
id: id,
|
|
query: query,
|
|
latitude: latitude,
|
|
longitude: longitude,
|
|
timestamp: timestamp,
|
|
),
|
|
createCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
required String query,
|
|
Value<double?> latitude = const Value.absent(),
|
|
Value<double?> longitude = const Value.absent(),
|
|
required int timestamp,
|
|
}) => SearchHistoryCompanion.insert(
|
|
id: id,
|
|
query: query,
|
|
latitude: latitude,
|
|
longitude: longitude,
|
|
timestamp: timestamp,
|
|
),
|
|
withReferenceMapper:
|
|
(p0) =>
|
|
p0
|
|
.map(
|
|
(e) => (
|
|
e.readTable(table),
|
|
BaseReferences(db, table, e),
|
|
),
|
|
)
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$SearchHistoryTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$AppDatabase,
|
|
$SearchHistoryTable,
|
|
SearchHistoryData,
|
|
$$SearchHistoryTableFilterComposer,
|
|
$$SearchHistoryTableOrderingComposer,
|
|
$$SearchHistoryTableAnnotationComposer,
|
|
$$SearchHistoryTableCreateCompanionBuilder,
|
|
$$SearchHistoryTableUpdateCompanionBuilder,
|
|
(
|
|
SearchHistoryData,
|
|
BaseReferences<_$AppDatabase, $SearchHistoryTable, SearchHistoryData>,
|
|
),
|
|
SearchHistoryData,
|
|
PrefetchHooks Function()
|
|
>;
|
|
typedef $$FavoritesTableCreateCompanionBuilder =
|
|
FavoritesCompanion Function({
|
|
Value<int> id,
|
|
Value<int?> osmId,
|
|
Value<String?> osmType,
|
|
required String name,
|
|
Value<String?> note,
|
|
Value<String> groupName,
|
|
required double latitude,
|
|
required double longitude,
|
|
Value<String?> addressJson,
|
|
required int createdAt,
|
|
required int updatedAt,
|
|
});
|
|
typedef $$FavoritesTableUpdateCompanionBuilder =
|
|
FavoritesCompanion Function({
|
|
Value<int> id,
|
|
Value<int?> osmId,
|
|
Value<String?> osmType,
|
|
Value<String> name,
|
|
Value<String?> note,
|
|
Value<String> groupName,
|
|
Value<double> latitude,
|
|
Value<double> longitude,
|
|
Value<String?> addressJson,
|
|
Value<int> createdAt,
|
|
Value<int> updatedAt,
|
|
});
|
|
|
|
class $$FavoritesTableFilterComposer
|
|
extends Composer<_$AppDatabase, $FavoritesTable> {
|
|
$$FavoritesTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get osmId => $composableBuilder(
|
|
column: $table.osmId,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get osmType => $composableBuilder(
|
|
column: $table.osmType,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get name => $composableBuilder(
|
|
column: $table.name,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get note => $composableBuilder(
|
|
column: $table.note,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get groupName => $composableBuilder(
|
|
column: $table.groupName,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get latitude => $composableBuilder(
|
|
column: $table.latitude,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get longitude => $composableBuilder(
|
|
column: $table.longitude,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get addressJson => $composableBuilder(
|
|
column: $table.addressJson,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get createdAt => $composableBuilder(
|
|
column: $table.createdAt,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get updatedAt => $composableBuilder(
|
|
column: $table.updatedAt,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$FavoritesTableOrderingComposer
|
|
extends Composer<_$AppDatabase, $FavoritesTable> {
|
|
$$FavoritesTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get osmId => $composableBuilder(
|
|
column: $table.osmId,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get osmType => $composableBuilder(
|
|
column: $table.osmType,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get name => $composableBuilder(
|
|
column: $table.name,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get note => $composableBuilder(
|
|
column: $table.note,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get groupName => $composableBuilder(
|
|
column: $table.groupName,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get latitude => $composableBuilder(
|
|
column: $table.latitude,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get longitude => $composableBuilder(
|
|
column: $table.longitude,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get addressJson => $composableBuilder(
|
|
column: $table.addressJson,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get createdAt => $composableBuilder(
|
|
column: $table.createdAt,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get updatedAt => $composableBuilder(
|
|
column: $table.updatedAt,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$FavoritesTableAnnotationComposer
|
|
extends Composer<_$AppDatabase, $FavoritesTable> {
|
|
$$FavoritesTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<int> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
|
|
GeneratedColumn<int> get osmId =>
|
|
$composableBuilder(column: $table.osmId, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get osmType =>
|
|
$composableBuilder(column: $table.osmType, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get name =>
|
|
$composableBuilder(column: $table.name, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get note =>
|
|
$composableBuilder(column: $table.note, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get groupName =>
|
|
$composableBuilder(column: $table.groupName, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get latitude =>
|
|
$composableBuilder(column: $table.latitude, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get longitude =>
|
|
$composableBuilder(column: $table.longitude, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get addressJson => $composableBuilder(
|
|
column: $table.addressJson,
|
|
builder: (column) => column,
|
|
);
|
|
|
|
GeneratedColumn<int> get createdAt =>
|
|
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
|
|
|
GeneratedColumn<int> get updatedAt =>
|
|
$composableBuilder(column: $table.updatedAt, builder: (column) => column);
|
|
}
|
|
|
|
class $$FavoritesTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$AppDatabase,
|
|
$FavoritesTable,
|
|
Favorite,
|
|
$$FavoritesTableFilterComposer,
|
|
$$FavoritesTableOrderingComposer,
|
|
$$FavoritesTableAnnotationComposer,
|
|
$$FavoritesTableCreateCompanionBuilder,
|
|
$$FavoritesTableUpdateCompanionBuilder,
|
|
(Favorite, BaseReferences<_$AppDatabase, $FavoritesTable, Favorite>),
|
|
Favorite,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$FavoritesTableTableManager(_$AppDatabase db, $FavoritesTable table)
|
|
: super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer:
|
|
() => $$FavoritesTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer:
|
|
() => $$FavoritesTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer:
|
|
() => $$FavoritesTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
Value<int?> osmId = const Value.absent(),
|
|
Value<String?> osmType = const Value.absent(),
|
|
Value<String> name = const Value.absent(),
|
|
Value<String?> note = const Value.absent(),
|
|
Value<String> groupName = const Value.absent(),
|
|
Value<double> latitude = const Value.absent(),
|
|
Value<double> longitude = const Value.absent(),
|
|
Value<String?> addressJson = const Value.absent(),
|
|
Value<int> createdAt = const Value.absent(),
|
|
Value<int> updatedAt = const Value.absent(),
|
|
}) => FavoritesCompanion(
|
|
id: id,
|
|
osmId: osmId,
|
|
osmType: osmType,
|
|
name: name,
|
|
note: note,
|
|
groupName: groupName,
|
|
latitude: latitude,
|
|
longitude: longitude,
|
|
addressJson: addressJson,
|
|
createdAt: createdAt,
|
|
updatedAt: updatedAt,
|
|
),
|
|
createCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
Value<int?> osmId = const Value.absent(),
|
|
Value<String?> osmType = const Value.absent(),
|
|
required String name,
|
|
Value<String?> note = const Value.absent(),
|
|
Value<String> groupName = const Value.absent(),
|
|
required double latitude,
|
|
required double longitude,
|
|
Value<String?> addressJson = const Value.absent(),
|
|
required int createdAt,
|
|
required int updatedAt,
|
|
}) => FavoritesCompanion.insert(
|
|
id: id,
|
|
osmId: osmId,
|
|
osmType: osmType,
|
|
name: name,
|
|
note: note,
|
|
groupName: groupName,
|
|
latitude: latitude,
|
|
longitude: longitude,
|
|
addressJson: addressJson,
|
|
createdAt: createdAt,
|
|
updatedAt: updatedAt,
|
|
),
|
|
withReferenceMapper:
|
|
(p0) =>
|
|
p0
|
|
.map(
|
|
(e) => (
|
|
e.readTable(table),
|
|
BaseReferences(db, table, e),
|
|
),
|
|
)
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$FavoritesTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$AppDatabase,
|
|
$FavoritesTable,
|
|
Favorite,
|
|
$$FavoritesTableFilterComposer,
|
|
$$FavoritesTableOrderingComposer,
|
|
$$FavoritesTableAnnotationComposer,
|
|
$$FavoritesTableCreateCompanionBuilder,
|
|
$$FavoritesTableUpdateCompanionBuilder,
|
|
(Favorite, BaseReferences<_$AppDatabase, $FavoritesTable, Favorite>),
|
|
Favorite,
|
|
PrefetchHooks Function()
|
|
>;
|
|
typedef $$OfflineRegionsTableCreateCompanionBuilder =
|
|
OfflineRegionsCompanion Function({
|
|
required String id,
|
|
required String name,
|
|
required double minLat,
|
|
required double minLon,
|
|
required double maxLat,
|
|
required double maxLon,
|
|
required int tilesSizeBytes,
|
|
required int routingSizeBytes,
|
|
required int poisSizeBytes,
|
|
required int downloadedAt,
|
|
required int lastUpdated,
|
|
Value<int> rowid,
|
|
});
|
|
typedef $$OfflineRegionsTableUpdateCompanionBuilder =
|
|
OfflineRegionsCompanion Function({
|
|
Value<String> id,
|
|
Value<String> name,
|
|
Value<double> minLat,
|
|
Value<double> minLon,
|
|
Value<double> maxLat,
|
|
Value<double> maxLon,
|
|
Value<int> tilesSizeBytes,
|
|
Value<int> routingSizeBytes,
|
|
Value<int> poisSizeBytes,
|
|
Value<int> downloadedAt,
|
|
Value<int> lastUpdated,
|
|
Value<int> rowid,
|
|
});
|
|
|
|
class $$OfflineRegionsTableFilterComposer
|
|
extends Composer<_$AppDatabase, $OfflineRegionsTable> {
|
|
$$OfflineRegionsTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<String> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get name => $composableBuilder(
|
|
column: $table.name,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get minLat => $composableBuilder(
|
|
column: $table.minLat,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get minLon => $composableBuilder(
|
|
column: $table.minLon,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get maxLat => $composableBuilder(
|
|
column: $table.maxLat,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get maxLon => $composableBuilder(
|
|
column: $table.maxLon,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get tilesSizeBytes => $composableBuilder(
|
|
column: $table.tilesSizeBytes,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get routingSizeBytes => $composableBuilder(
|
|
column: $table.routingSizeBytes,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get poisSizeBytes => $composableBuilder(
|
|
column: $table.poisSizeBytes,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get downloadedAt => $composableBuilder(
|
|
column: $table.downloadedAt,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<int> get lastUpdated => $composableBuilder(
|
|
column: $table.lastUpdated,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$OfflineRegionsTableOrderingComposer
|
|
extends Composer<_$AppDatabase, $OfflineRegionsTable> {
|
|
$$OfflineRegionsTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<String> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get name => $composableBuilder(
|
|
column: $table.name,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get minLat => $composableBuilder(
|
|
column: $table.minLat,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get minLon => $composableBuilder(
|
|
column: $table.minLon,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get maxLat => $composableBuilder(
|
|
column: $table.maxLat,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get maxLon => $composableBuilder(
|
|
column: $table.maxLon,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get tilesSizeBytes => $composableBuilder(
|
|
column: $table.tilesSizeBytes,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get routingSizeBytes => $composableBuilder(
|
|
column: $table.routingSizeBytes,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get poisSizeBytes => $composableBuilder(
|
|
column: $table.poisSizeBytes,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get downloadedAt => $composableBuilder(
|
|
column: $table.downloadedAt,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<int> get lastUpdated => $composableBuilder(
|
|
column: $table.lastUpdated,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$OfflineRegionsTableAnnotationComposer
|
|
extends Composer<_$AppDatabase, $OfflineRegionsTable> {
|
|
$$OfflineRegionsTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<String> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get name =>
|
|
$composableBuilder(column: $table.name, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get minLat =>
|
|
$composableBuilder(column: $table.minLat, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get minLon =>
|
|
$composableBuilder(column: $table.minLon, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get maxLat =>
|
|
$composableBuilder(column: $table.maxLat, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get maxLon =>
|
|
$composableBuilder(column: $table.maxLon, builder: (column) => column);
|
|
|
|
GeneratedColumn<int> get tilesSizeBytes => $composableBuilder(
|
|
column: $table.tilesSizeBytes,
|
|
builder: (column) => column,
|
|
);
|
|
|
|
GeneratedColumn<int> get routingSizeBytes => $composableBuilder(
|
|
column: $table.routingSizeBytes,
|
|
builder: (column) => column,
|
|
);
|
|
|
|
GeneratedColumn<int> get poisSizeBytes => $composableBuilder(
|
|
column: $table.poisSizeBytes,
|
|
builder: (column) => column,
|
|
);
|
|
|
|
GeneratedColumn<int> get downloadedAt => $composableBuilder(
|
|
column: $table.downloadedAt,
|
|
builder: (column) => column,
|
|
);
|
|
|
|
GeneratedColumn<int> get lastUpdated => $composableBuilder(
|
|
column: $table.lastUpdated,
|
|
builder: (column) => column,
|
|
);
|
|
}
|
|
|
|
class $$OfflineRegionsTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$AppDatabase,
|
|
$OfflineRegionsTable,
|
|
OfflineRegion,
|
|
$$OfflineRegionsTableFilterComposer,
|
|
$$OfflineRegionsTableOrderingComposer,
|
|
$$OfflineRegionsTableAnnotationComposer,
|
|
$$OfflineRegionsTableCreateCompanionBuilder,
|
|
$$OfflineRegionsTableUpdateCompanionBuilder,
|
|
(
|
|
OfflineRegion,
|
|
BaseReferences<_$AppDatabase, $OfflineRegionsTable, OfflineRegion>,
|
|
),
|
|
OfflineRegion,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$OfflineRegionsTableTableManager(
|
|
_$AppDatabase db,
|
|
$OfflineRegionsTable table,
|
|
) : super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer:
|
|
() => $$OfflineRegionsTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer:
|
|
() =>
|
|
$$OfflineRegionsTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer:
|
|
() => $$OfflineRegionsTableAnnotationComposer(
|
|
$db: db,
|
|
$table: table,
|
|
),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<String> id = const Value.absent(),
|
|
Value<String> name = const Value.absent(),
|
|
Value<double> minLat = const Value.absent(),
|
|
Value<double> minLon = const Value.absent(),
|
|
Value<double> maxLat = const Value.absent(),
|
|
Value<double> maxLon = const Value.absent(),
|
|
Value<int> tilesSizeBytes = const Value.absent(),
|
|
Value<int> routingSizeBytes = const Value.absent(),
|
|
Value<int> poisSizeBytes = const Value.absent(),
|
|
Value<int> downloadedAt = const Value.absent(),
|
|
Value<int> lastUpdated = const Value.absent(),
|
|
Value<int> rowid = const Value.absent(),
|
|
}) => OfflineRegionsCompanion(
|
|
id: id,
|
|
name: name,
|
|
minLat: minLat,
|
|
minLon: minLon,
|
|
maxLat: maxLat,
|
|
maxLon: maxLon,
|
|
tilesSizeBytes: tilesSizeBytes,
|
|
routingSizeBytes: routingSizeBytes,
|
|
poisSizeBytes: poisSizeBytes,
|
|
downloadedAt: downloadedAt,
|
|
lastUpdated: lastUpdated,
|
|
rowid: rowid,
|
|
),
|
|
createCompanionCallback:
|
|
({
|
|
required String id,
|
|
required String name,
|
|
required double minLat,
|
|
required double minLon,
|
|
required double maxLat,
|
|
required double maxLon,
|
|
required int tilesSizeBytes,
|
|
required int routingSizeBytes,
|
|
required int poisSizeBytes,
|
|
required int downloadedAt,
|
|
required int lastUpdated,
|
|
Value<int> rowid = const Value.absent(),
|
|
}) => OfflineRegionsCompanion.insert(
|
|
id: id,
|
|
name: name,
|
|
minLat: minLat,
|
|
minLon: minLon,
|
|
maxLat: maxLat,
|
|
maxLon: maxLon,
|
|
tilesSizeBytes: tilesSizeBytes,
|
|
routingSizeBytes: routingSizeBytes,
|
|
poisSizeBytes: poisSizeBytes,
|
|
downloadedAt: downloadedAt,
|
|
lastUpdated: lastUpdated,
|
|
rowid: rowid,
|
|
),
|
|
withReferenceMapper:
|
|
(p0) =>
|
|
p0
|
|
.map(
|
|
(e) => (
|
|
e.readTable(table),
|
|
BaseReferences(db, table, e),
|
|
),
|
|
)
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$OfflineRegionsTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$AppDatabase,
|
|
$OfflineRegionsTable,
|
|
OfflineRegion,
|
|
$$OfflineRegionsTableFilterComposer,
|
|
$$OfflineRegionsTableOrderingComposer,
|
|
$$OfflineRegionsTableAnnotationComposer,
|
|
$$OfflineRegionsTableCreateCompanionBuilder,
|
|
$$OfflineRegionsTableUpdateCompanionBuilder,
|
|
(
|
|
OfflineRegion,
|
|
BaseReferences<_$AppDatabase, $OfflineRegionsTable, OfflineRegion>,
|
|
),
|
|
OfflineRegion,
|
|
PrefetchHooks Function()
|
|
>;
|
|
typedef $$SettingsTableCreateCompanionBuilder =
|
|
SettingsCompanion Function({
|
|
required String key,
|
|
required String value,
|
|
Value<int> rowid,
|
|
});
|
|
typedef $$SettingsTableUpdateCompanionBuilder =
|
|
SettingsCompanion Function({
|
|
Value<String> key,
|
|
Value<String> value,
|
|
Value<int> rowid,
|
|
});
|
|
|
|
class $$SettingsTableFilterComposer
|
|
extends Composer<_$AppDatabase, $SettingsTable> {
|
|
$$SettingsTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<String> get key => $composableBuilder(
|
|
column: $table.key,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get value => $composableBuilder(
|
|
column: $table.value,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$SettingsTableOrderingComposer
|
|
extends Composer<_$AppDatabase, $SettingsTable> {
|
|
$$SettingsTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<String> get key => $composableBuilder(
|
|
column: $table.key,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get value => $composableBuilder(
|
|
column: $table.value,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$SettingsTableAnnotationComposer
|
|
extends Composer<_$AppDatabase, $SettingsTable> {
|
|
$$SettingsTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<String> get key =>
|
|
$composableBuilder(column: $table.key, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get value =>
|
|
$composableBuilder(column: $table.value, builder: (column) => column);
|
|
}
|
|
|
|
class $$SettingsTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$AppDatabase,
|
|
$SettingsTable,
|
|
Setting,
|
|
$$SettingsTableFilterComposer,
|
|
$$SettingsTableOrderingComposer,
|
|
$$SettingsTableAnnotationComposer,
|
|
$$SettingsTableCreateCompanionBuilder,
|
|
$$SettingsTableUpdateCompanionBuilder,
|
|
(Setting, BaseReferences<_$AppDatabase, $SettingsTable, Setting>),
|
|
Setting,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$SettingsTableTableManager(_$AppDatabase db, $SettingsTable table)
|
|
: super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer:
|
|
() => $$SettingsTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer:
|
|
() => $$SettingsTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer:
|
|
() => $$SettingsTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<String> key = const Value.absent(),
|
|
Value<String> value = const Value.absent(),
|
|
Value<int> rowid = const Value.absent(),
|
|
}) => SettingsCompanion(key: key, value: value, rowid: rowid),
|
|
createCompanionCallback:
|
|
({
|
|
required String key,
|
|
required String value,
|
|
Value<int> rowid = const Value.absent(),
|
|
}) => SettingsCompanion.insert(
|
|
key: key,
|
|
value: value,
|
|
rowid: rowid,
|
|
),
|
|
withReferenceMapper:
|
|
(p0) =>
|
|
p0
|
|
.map(
|
|
(e) => (
|
|
e.readTable(table),
|
|
BaseReferences(db, table, e),
|
|
),
|
|
)
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$SettingsTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$AppDatabase,
|
|
$SettingsTable,
|
|
Setting,
|
|
$$SettingsTableFilterComposer,
|
|
$$SettingsTableOrderingComposer,
|
|
$$SettingsTableAnnotationComposer,
|
|
$$SettingsTableCreateCompanionBuilder,
|
|
$$SettingsTableUpdateCompanionBuilder,
|
|
(Setting, BaseReferences<_$AppDatabase, $SettingsTable, Setting>),
|
|
Setting,
|
|
PrefetchHooks Function()
|
|
>;
|
|
|
|
class $AppDatabaseManager {
|
|
final _$AppDatabase _db;
|
|
$AppDatabaseManager(this._db);
|
|
$$SearchHistoryTableTableManager get searchHistory =>
|
|
$$SearchHistoryTableTableManager(_db, _db.searchHistory);
|
|
$$FavoritesTableTableManager get favorites =>
|
|
$$FavoritesTableTableManager(_db, _db.favorites);
|
|
$$OfflineRegionsTableTableManager get offlineRegions =>
|
|
$$OfflineRegionsTableTableManager(_db, _db.offlineRegions);
|
|
$$SettingsTableTableManager get settings =>
|
|
$$SettingsTableTableManager(_db, _db.settings);
|
|
}
|