// dart format width=80 import 'dart:typed_data' as i2; // GENERATED BY drift_dev, DO NOT MODIFY. // ignore_for_file: type=lint,unused_import // import 'package:drift/drift.dart'; class Setting extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Setting(this.attachedDatabase, [this._alias]); late final GeneratedColumn key = GeneratedColumn( 'key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'PRIMARY KEY NOT NULL', ); late final GeneratedColumn partitionKey = GeneratedColumn( 'partition_key', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, $customConstraints: '', ); late final GeneratedColumn value = GeneratedColumn( 'value', aliasedName, true, type: DriftSqlType.any, requiredDuringInsert: false, $customConstraints: '', ); @override List get $columns => [key, partitionKey, value]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'setting'; @override Set get $primaryKey => {key}; @override SettingData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SettingData( key: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}key'], )!, partitionKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}partition_key'], ), value: attachedDatabase.typeMapping.read( DriftSqlType.any, data['${effectivePrefix}value'], ), ); } @override Setting createAlias(String alias) { return Setting(attachedDatabase, alias); } @override bool get isStrict => true; @override bool get dontWriteConstraints => true; } class SettingData extends DataClass implements Insertable { final String key; final String? partitionKey; final DriftAny? value; const SettingData({required this.key, this.partitionKey, this.value}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['key'] = Variable(key); if (!nullToAbsent || partitionKey != null) { map['partition_key'] = Variable(partitionKey); } if (!nullToAbsent || value != null) { map['value'] = Variable(value); } return map; } factory SettingData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return SettingData( key: serializer.fromJson(json['key']), partitionKey: serializer.fromJson(json['partitionKey']), value: serializer.fromJson(json['value']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'key': serializer.toJson(key), 'partitionKey': serializer.toJson(partitionKey), 'value': serializer.toJson(value), }; } SettingData copyWith({ String? key, Value partitionKey = const Value.absent(), Value value = const Value.absent(), }) => SettingData( key: key ?? this.key, partitionKey: partitionKey.present ? partitionKey.value : this.partitionKey, value: value.present ? value.value : this.value, ); SettingData copyWithCompanion(SettingCompanion data) { return SettingData( key: data.key.present ? data.key.value : this.key, partitionKey: data.partitionKey.present ? data.partitionKey.value : this.partitionKey, value: data.value.present ? data.value.value : this.value, ); } @override String toString() { return (StringBuffer('SettingData(') ..write('key: $key, ') ..write('partitionKey: $partitionKey, ') ..write('value: $value') ..write(')')) .toString(); } @override int get hashCode => Object.hash(key, partitionKey, value); @override bool operator ==(Object other) => identical(this, other) || (other is SettingData && other.key == this.key && other.partitionKey == this.partitionKey && other.value == this.value); } class SettingCompanion extends UpdateCompanion { final Value key; final Value partitionKey; final Value value; final Value rowid; const SettingCompanion({ this.key = const Value.absent(), this.partitionKey = const Value.absent(), this.value = const Value.absent(), this.rowid = const Value.absent(), }); SettingCompanion.insert({ required String key, this.partitionKey = const Value.absent(), this.value = const Value.absent(), this.rowid = const Value.absent(), }) : key = Value(key); static Insertable custom({ Expression? key, Expression? partitionKey, Expression? value, Expression? rowid, }) { return RawValuesInsertable({ if (key != null) 'key': key, if (partitionKey != null) 'partition_key': partitionKey, if (value != null) 'value': value, if (rowid != null) 'rowid': rowid, }); } SettingCompanion copyWith({ Value? key, Value? partitionKey, Value? value, Value? rowid, }) { return SettingCompanion( key: key ?? this.key, partitionKey: partitionKey ?? this.partitionKey, value: value ?? this.value, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (key.present) { map['key'] = Variable(key.value); } if (partitionKey.present) { map['partition_key'] = Variable(partitionKey.value); } if (value.present) { map['value'] = Variable(value.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('SettingCompanion(') ..write('key: $key, ') ..write('partitionKey: $partitionKey, ') ..write('value: $value, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class IconCache extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; IconCache(this.attachedDatabase, [this._alias]); late final GeneratedColumn origin = GeneratedColumn( 'origin', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'PRIMARY KEY NOT NULL', ); late final GeneratedColumn iconData = GeneratedColumn( 'icon_data', aliasedName, false, type: DriftSqlType.blob, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn fetchDate = GeneratedColumn( 'fetch_date', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); @override List get $columns => [origin, iconData, fetchDate]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'icon_cache'; @override Set get $primaryKey => {origin}; @override IconCacheData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return IconCacheData( origin: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}origin'], )!, iconData: attachedDatabase.typeMapping.read( DriftSqlType.blob, data['${effectivePrefix}icon_data'], )!, fetchDate: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}fetch_date'], )!, ); } @override IconCache createAlias(String alias) { return IconCache(attachedDatabase, alias); } @override bool get dontWriteConstraints => true; } class IconCacheData extends DataClass implements Insertable { final String origin; final i2.Uint8List iconData; final int fetchDate; const IconCacheData({ required this.origin, required this.iconData, required this.fetchDate, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['origin'] = Variable(origin); map['icon_data'] = Variable(iconData); map['fetch_date'] = Variable(fetchDate); return map; } factory IconCacheData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return IconCacheData( origin: serializer.fromJson(json['origin']), iconData: serializer.fromJson(json['iconData']), fetchDate: serializer.fromJson(json['fetchDate']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'origin': serializer.toJson(origin), 'iconData': serializer.toJson(iconData), 'fetchDate': serializer.toJson(fetchDate), }; } IconCacheData copyWith({ String? origin, i2.Uint8List? iconData, int? fetchDate, }) => IconCacheData( origin: origin ?? this.origin, iconData: iconData ?? this.iconData, fetchDate: fetchDate ?? this.fetchDate, ); IconCacheData copyWithCompanion(IconCacheCompanion data) { return IconCacheData( origin: data.origin.present ? data.origin.value : this.origin, iconData: data.iconData.present ? data.iconData.value : this.iconData, fetchDate: data.fetchDate.present ? data.fetchDate.value : this.fetchDate, ); } @override String toString() { return (StringBuffer('IconCacheData(') ..write('origin: $origin, ') ..write('iconData: $iconData, ') ..write('fetchDate: $fetchDate') ..write(')')) .toString(); } @override int get hashCode => Object.hash(origin, $driftBlobEquality.hash(iconData), fetchDate); @override bool operator ==(Object other) => identical(this, other) || (other is IconCacheData && other.origin == this.origin && $driftBlobEquality.equals(other.iconData, this.iconData) && other.fetchDate == this.fetchDate); } class IconCacheCompanion extends UpdateCompanion { final Value origin; final Value iconData; final Value fetchDate; final Value rowid; const IconCacheCompanion({ this.origin = const Value.absent(), this.iconData = const Value.absent(), this.fetchDate = const Value.absent(), this.rowid = const Value.absent(), }); IconCacheCompanion.insert({ required String origin, required i2.Uint8List iconData, required int fetchDate, this.rowid = const Value.absent(), }) : origin = Value(origin), iconData = Value(iconData), fetchDate = Value(fetchDate); static Insertable custom({ Expression? origin, Expression? iconData, Expression? fetchDate, Expression? rowid, }) { return RawValuesInsertable({ if (origin != null) 'origin': origin, if (iconData != null) 'icon_data': iconData, if (fetchDate != null) 'fetch_date': fetchDate, if (rowid != null) 'rowid': rowid, }); } IconCacheCompanion copyWith({ Value? origin, Value? iconData, Value? fetchDate, Value? rowid, }) { return IconCacheCompanion( origin: origin ?? this.origin, iconData: iconData ?? this.iconData, fetchDate: fetchDate ?? this.fetchDate, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (origin.present) { map['origin'] = Variable(origin.value); } if (iconData.present) { map['icon_data'] = Variable(iconData.value); } if (fetchDate.present) { map['fetch_date'] = Variable(fetchDate.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('IconCacheCompanion(') ..write('origin: $origin, ') ..write('iconData: $iconData, ') ..write('fetchDate: $fetchDate, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class Onboarding extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Onboarding(this.attachedDatabase, [this._alias]); late final GeneratedColumn revision = GeneratedColumn( 'revision', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn completionDate = GeneratedColumn( 'completion_date', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); @override List get $columns => [revision, completionDate]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'onboarding'; @override Set get $primaryKey => const {}; @override OnboardingData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return OnboardingData( revision: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}revision'], )!, completionDate: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}completion_date'], )!, ); } @override Onboarding createAlias(String alias) { return Onboarding(attachedDatabase, alias); } @override bool get dontWriteConstraints => true; } class OnboardingData extends DataClass implements Insertable { final int revision; final int completionDate; const OnboardingData({required this.revision, required this.completionDate}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['revision'] = Variable(revision); map['completion_date'] = Variable(completionDate); return map; } factory OnboardingData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return OnboardingData( revision: serializer.fromJson(json['revision']), completionDate: serializer.fromJson(json['completionDate']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'revision': serializer.toJson(revision), 'completionDate': serializer.toJson(completionDate), }; } OnboardingData copyWith({int? revision, int? completionDate}) => OnboardingData( revision: revision ?? this.revision, completionDate: completionDate ?? this.completionDate, ); OnboardingData copyWithCompanion(OnboardingCompanion data) { return OnboardingData( revision: data.revision.present ? data.revision.value : this.revision, completionDate: data.completionDate.present ? data.completionDate.value : this.completionDate, ); } @override String toString() { return (StringBuffer('OnboardingData(') ..write('revision: $revision, ') ..write('completionDate: $completionDate') ..write(')')) .toString(); } @override int get hashCode => Object.hash(revision, completionDate); @override bool operator ==(Object other) => identical(this, other) || (other is OnboardingData && other.revision == this.revision && other.completionDate == this.completionDate); } class OnboardingCompanion extends UpdateCompanion { final Value revision; final Value completionDate; final Value rowid; const OnboardingCompanion({ this.revision = const Value.absent(), this.completionDate = const Value.absent(), this.rowid = const Value.absent(), }); OnboardingCompanion.insert({ required int revision, required int completionDate, this.rowid = const Value.absent(), }) : revision = Value(revision), completionDate = Value(completionDate); static Insertable custom({ Expression? revision, Expression? completionDate, Expression? rowid, }) { return RawValuesInsertable({ if (revision != null) 'revision': revision, if (completionDate != null) 'completion_date': completionDate, if (rowid != null) 'rowid': rowid, }); } OnboardingCompanion copyWith({ Value? revision, Value? completionDate, Value? rowid, }) { return OnboardingCompanion( revision: revision ?? this.revision, completionDate: completionDate ?? this.completionDate, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (revision.present) { map['revision'] = Variable(revision.value); } if (completionDate.present) { map['completion_date'] = Variable(completionDate.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('OnboardingCompanion(') ..write('revision: $revision, ') ..write('completionDate: $completionDate, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class Riverpod extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Riverpod(this.attachedDatabase, [this._alias]); late final GeneratedColumn key = GeneratedColumn( 'key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'PRIMARY KEY NOT NULL', ); late final GeneratedColumn json = GeneratedColumn( 'json', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn expireAt = GeneratedColumn( 'expireAt', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, $customConstraints: '', ); late final GeneratedColumn destroyKey = GeneratedColumn( 'destroyKey', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, $customConstraints: '', ); @override List get $columns => [key, json, expireAt, destroyKey]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'riverpod'; @override Set get $primaryKey => {key}; @override RiverpodData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return RiverpodData( key: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}key'], )!, json: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}json'], )!, expireAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}expireAt'], ), destroyKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}destroyKey'], ), ); } @override Riverpod createAlias(String alias) { return Riverpod(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get dontWriteConstraints => true; } class RiverpodData extends DataClass implements Insertable { final String key; final String json; final int? expireAt; final String? destroyKey; const RiverpodData({ required this.key, required this.json, this.expireAt, this.destroyKey, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['key'] = Variable(key); map['json'] = Variable(json); if (!nullToAbsent || expireAt != null) { map['expireAt'] = Variable(expireAt); } if (!nullToAbsent || destroyKey != null) { map['destroyKey'] = Variable(destroyKey); } return map; } factory RiverpodData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return RiverpodData( key: serializer.fromJson(json['key']), json: serializer.fromJson(json['json']), expireAt: serializer.fromJson(json['expireAt']), destroyKey: serializer.fromJson(json['destroyKey']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'key': serializer.toJson(key), 'json': serializer.toJson(json), 'expireAt': serializer.toJson(expireAt), 'destroyKey': serializer.toJson(destroyKey), }; } RiverpodData copyWith({ String? key, String? json, Value expireAt = const Value.absent(), Value destroyKey = const Value.absent(), }) => RiverpodData( key: key ?? this.key, json: json ?? this.json, expireAt: expireAt.present ? expireAt.value : this.expireAt, destroyKey: destroyKey.present ? destroyKey.value : this.destroyKey, ); RiverpodData copyWithCompanion(RiverpodCompanion data) { return RiverpodData( key: data.key.present ? data.key.value : this.key, json: data.json.present ? data.json.value : this.json, expireAt: data.expireAt.present ? data.expireAt.value : this.expireAt, destroyKey: data.destroyKey.present ? data.destroyKey.value : this.destroyKey, ); } @override String toString() { return (StringBuffer('RiverpodData(') ..write('key: $key, ') ..write('json: $json, ') ..write('expireAt: $expireAt, ') ..write('destroyKey: $destroyKey') ..write(')')) .toString(); } @override int get hashCode => Object.hash(key, json, expireAt, destroyKey); @override bool operator ==(Object other) => identical(this, other) || (other is RiverpodData && other.key == this.key && other.json == this.json && other.expireAt == this.expireAt && other.destroyKey == this.destroyKey); } class RiverpodCompanion extends UpdateCompanion { final Value key; final Value json; final Value expireAt; final Value destroyKey; const RiverpodCompanion({ this.key = const Value.absent(), this.json = const Value.absent(), this.expireAt = const Value.absent(), this.destroyKey = const Value.absent(), }); RiverpodCompanion.insert({ required String key, required String json, this.expireAt = const Value.absent(), this.destroyKey = const Value.absent(), }) : key = Value(key), json = Value(json); static Insertable custom({ Expression? key, Expression? json, Expression? expireAt, Expression? destroyKey, }) { return RawValuesInsertable({ if (key != null) 'key': key, if (json != null) 'json': json, if (expireAt != null) 'expireAt': expireAt, if (destroyKey != null) 'destroyKey': destroyKey, }); } RiverpodCompanion copyWith({ Value? key, Value? json, Value? expireAt, Value? destroyKey, }) { return RiverpodCompanion( key: key ?? this.key, json: json ?? this.json, expireAt: expireAt ?? this.expireAt, destroyKey: destroyKey ?? this.destroyKey, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (key.present) { map['key'] = Variable(key.value); } if (json.present) { map['json'] = Variable(json.value); } if (expireAt.present) { map['expireAt'] = Variable(expireAt.value); } if (destroyKey.present) { map['destroyKey'] = Variable(destroyKey.value); } return map; } @override String toString() { return (StringBuffer('RiverpodCompanion(') ..write('key: $key, ') ..write('json: $json, ') ..write('expireAt: $expireAt, ') ..write('destroyKey: $destroyKey') ..write(')')) .toString(); } } class DatabaseAtV2 extends GeneratedDatabase { DatabaseAtV2(QueryExecutor e) : super(e); late final Setting setting = Setting(this); late final IconCache iconCache = IconCache(this); late final Onboarding onboarding = Onboarding(this); late final Riverpod riverpod = Riverpod(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ setting, iconCache, onboarding, riverpod, ]; @override int get schemaVersion => 2; }