// 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 ProxyProfile extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; ProxyProfile(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL PRIMARY KEY', ); late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn configJson = GeneratedColumn( 'config_json', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn dnsOverrideJson = GeneratedColumn( 'dns_override_json', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, $customConstraints: '', ); late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), ); late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), ); @override List get $columns => [ id, name, type, configJson, dnsOverrideJson, createdAt, updatedAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'proxy_profile'; @override Set get $primaryKey => {id}; @override ProxyProfileData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ProxyProfileData( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, type: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}type'], )!, configJson: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}config_json'], )!, dnsOverrideJson: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}dns_override_json'], ), createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}updated_at'], )!, ); } @override ProxyProfile createAlias(String alias) { return ProxyProfile(attachedDatabase, alias); } @override bool get dontWriteConstraints => true; } class ProxyProfileData extends DataClass implements Insertable { final String id; final String name; final String type; final String configJson; final String? dnsOverrideJson; final int createdAt; final int updatedAt; const ProxyProfileData({ required this.id, required this.name, required this.type, required this.configJson, this.dnsOverrideJson, required this.createdAt, required this.updatedAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['name'] = Variable(name); map['type'] = Variable(type); map['config_json'] = Variable(configJson); if (!nullToAbsent || dnsOverrideJson != null) { map['dns_override_json'] = Variable(dnsOverrideJson); } map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); return map; } factory ProxyProfileData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ProxyProfileData( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), type: serializer.fromJson(json['type']), configJson: serializer.fromJson(json['configJson']), dnsOverrideJson: serializer.fromJson(json['dnsOverrideJson']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'type': serializer.toJson(type), 'configJson': serializer.toJson(configJson), 'dnsOverrideJson': serializer.toJson(dnsOverrideJson), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), }; } ProxyProfileData copyWith({ String? id, String? name, String? type, String? configJson, Value dnsOverrideJson = const Value.absent(), int? createdAt, int? updatedAt, }) => ProxyProfileData( id: id ?? this.id, name: name ?? this.name, type: type ?? this.type, configJson: configJson ?? this.configJson, dnsOverrideJson: dnsOverrideJson.present ? dnsOverrideJson.value : this.dnsOverrideJson, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, ); ProxyProfileData copyWithCompanion(ProxyProfileCompanion data) { return ProxyProfileData( id: data.id.present ? data.id.value : this.id, name: data.name.present ? data.name.value : this.name, type: data.type.present ? data.type.value : this.type, configJson: data.configJson.present ? data.configJson.value : this.configJson, dnsOverrideJson: data.dnsOverrideJson.present ? data.dnsOverrideJson.value : this.dnsOverrideJson, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, ); } @override String toString() { return (StringBuffer('ProxyProfileData(') ..write('id: $id, ') ..write('name: $name, ') ..write('type: $type, ') ..write('configJson: $configJson, ') ..write('dnsOverrideJson: $dnsOverrideJson, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, name, type, configJson, dnsOverrideJson, createdAt, updatedAt, ); @override bool operator ==(Object other) => identical(this, other) || (other is ProxyProfileData && other.id == this.id && other.name == this.name && other.type == this.type && other.configJson == this.configJson && other.dnsOverrideJson == this.dnsOverrideJson && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt); } class ProxyProfileCompanion extends UpdateCompanion { final Value id; final Value name; final Value type; final Value configJson; final Value dnsOverrideJson; final Value createdAt; final Value updatedAt; final Value rowid; const ProxyProfileCompanion({ this.id = const Value.absent(), this.name = const Value.absent(), this.type = const Value.absent(), this.configJson = const Value.absent(), this.dnsOverrideJson = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.rowid = const Value.absent(), }); ProxyProfileCompanion.insert({ required String id, required String name, required String type, required String configJson, this.dnsOverrideJson = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), name = Value(name), type = Value(type), configJson = Value(configJson); static Insertable custom({ Expression? id, Expression? name, Expression? type, Expression? configJson, Expression? dnsOverrideJson, Expression? createdAt, Expression? updatedAt, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (type != null) 'type': type, if (configJson != null) 'config_json': configJson, if (dnsOverrideJson != null) 'dns_override_json': dnsOverrideJson, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (rowid != null) 'rowid': rowid, }); } ProxyProfileCompanion copyWith({ Value? id, Value? name, Value? type, Value? configJson, Value? dnsOverrideJson, Value? createdAt, Value? updatedAt, Value? rowid, }) { return ProxyProfileCompanion( id: id ?? this.id, name: name ?? this.name, type: type ?? this.type, configJson: configJson ?? this.configJson, dnsOverrideJson: dnsOverrideJson ?? this.dnsOverrideJson, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (name.present) { map['name'] = Variable(name.value); } if (type.present) { map['type'] = Variable(type.value); } if (configJson.present) { map['config_json'] = Variable(configJson.value); } if (dnsOverrideJson.present) { map['dns_override_json'] = Variable(dnsOverrideJson.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ProxyProfileCompanion(') ..write('id: $id, ') ..write('name: $name, ') ..write('type: $type, ') ..write('configJson: $configJson, ') ..write('dnsOverrideJson: $dnsOverrideJson, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class ProxyRoutingSetting extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; ProxyRoutingSetting(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, $customConstraints: 'NOT NULL PRIMARY KEY CHECK (id = 1)', ); late final GeneratedColumn regularTabsMode = GeneratedColumn( 'regular_tabs_mode', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn regularTabsProxyConnectionId = GeneratedColumn( 'regular_tabs_proxy_connection_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, $customConstraints: '', ); late final GeneratedColumn privateTabsProxyConnectionId = GeneratedColumn( 'private_tabs_proxy_connection_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, $customConstraints: '', ); @override List get $columns => [ id, regularTabsMode, regularTabsProxyConnectionId, privateTabsProxyConnectionId, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'proxy_routing_setting'; @override Set get $primaryKey => {id}; @override ProxyRoutingSettingData map( Map data, { String? tablePrefix, }) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ProxyRoutingSettingData( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, regularTabsMode: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}regular_tabs_mode'], )!, regularTabsProxyConnectionId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}regular_tabs_proxy_connection_id'], ), privateTabsProxyConnectionId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}private_tabs_proxy_connection_id'], ), ); } @override ProxyRoutingSetting createAlias(String alias) { return ProxyRoutingSetting(attachedDatabase, alias); } @override bool get dontWriteConstraints => true; } class ProxyRoutingSettingData extends DataClass implements Insertable { final int id; final String regularTabsMode; final String? regularTabsProxyConnectionId; final String? privateTabsProxyConnectionId; const ProxyRoutingSettingData({ required this.id, required this.regularTabsMode, this.regularTabsProxyConnectionId, this.privateTabsProxyConnectionId, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['regular_tabs_mode'] = Variable(regularTabsMode); if (!nullToAbsent || regularTabsProxyConnectionId != null) { map['regular_tabs_proxy_connection_id'] = Variable( regularTabsProxyConnectionId, ); } if (!nullToAbsent || privateTabsProxyConnectionId != null) { map['private_tabs_proxy_connection_id'] = Variable( privateTabsProxyConnectionId, ); } return map; } factory ProxyRoutingSettingData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ProxyRoutingSettingData( id: serializer.fromJson(json['id']), regularTabsMode: serializer.fromJson(json['regularTabsMode']), regularTabsProxyConnectionId: serializer.fromJson( json['regularTabsProxyConnectionId'], ), privateTabsProxyConnectionId: serializer.fromJson( json['privateTabsProxyConnectionId'], ), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'regularTabsMode': serializer.toJson(regularTabsMode), 'regularTabsProxyConnectionId': serializer.toJson( regularTabsProxyConnectionId, ), 'privateTabsProxyConnectionId': serializer.toJson( privateTabsProxyConnectionId, ), }; } ProxyRoutingSettingData copyWith({ int? id, String? regularTabsMode, Value regularTabsProxyConnectionId = const Value.absent(), Value privateTabsProxyConnectionId = const Value.absent(), }) => ProxyRoutingSettingData( id: id ?? this.id, regularTabsMode: regularTabsMode ?? this.regularTabsMode, regularTabsProxyConnectionId: regularTabsProxyConnectionId.present ? regularTabsProxyConnectionId.value : this.regularTabsProxyConnectionId, privateTabsProxyConnectionId: privateTabsProxyConnectionId.present ? privateTabsProxyConnectionId.value : this.privateTabsProxyConnectionId, ); ProxyRoutingSettingData copyWithCompanion(ProxyRoutingSettingCompanion data) { return ProxyRoutingSettingData( id: data.id.present ? data.id.value : this.id, regularTabsMode: data.regularTabsMode.present ? data.regularTabsMode.value : this.regularTabsMode, regularTabsProxyConnectionId: data.regularTabsProxyConnectionId.present ? data.regularTabsProxyConnectionId.value : this.regularTabsProxyConnectionId, privateTabsProxyConnectionId: data.privateTabsProxyConnectionId.present ? data.privateTabsProxyConnectionId.value : this.privateTabsProxyConnectionId, ); } @override String toString() { return (StringBuffer('ProxyRoutingSettingData(') ..write('id: $id, ') ..write('regularTabsMode: $regularTabsMode, ') ..write( 'regularTabsProxyConnectionId: $regularTabsProxyConnectionId, ', ) ..write('privateTabsProxyConnectionId: $privateTabsProxyConnectionId') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, regularTabsMode, regularTabsProxyConnectionId, privateTabsProxyConnectionId, ); @override bool operator ==(Object other) => identical(this, other) || (other is ProxyRoutingSettingData && other.id == this.id && other.regularTabsMode == this.regularTabsMode && other.regularTabsProxyConnectionId == this.regularTabsProxyConnectionId && other.privateTabsProxyConnectionId == this.privateTabsProxyConnectionId); } class ProxyRoutingSettingCompanion extends UpdateCompanion { final Value id; final Value regularTabsMode; final Value regularTabsProxyConnectionId; final Value privateTabsProxyConnectionId; const ProxyRoutingSettingCompanion({ this.id = const Value.absent(), this.regularTabsMode = const Value.absent(), this.regularTabsProxyConnectionId = const Value.absent(), this.privateTabsProxyConnectionId = const Value.absent(), }); ProxyRoutingSettingCompanion.insert({ this.id = const Value.absent(), required String regularTabsMode, this.regularTabsProxyConnectionId = const Value.absent(), this.privateTabsProxyConnectionId = const Value.absent(), }) : regularTabsMode = Value(regularTabsMode); static Insertable custom({ Expression? id, Expression? regularTabsMode, Expression? regularTabsProxyConnectionId, Expression? privateTabsProxyConnectionId, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (regularTabsMode != null) 'regular_tabs_mode': regularTabsMode, if (regularTabsProxyConnectionId != null) 'regular_tabs_proxy_connection_id': regularTabsProxyConnectionId, if (privateTabsProxyConnectionId != null) 'private_tabs_proxy_connection_id': privateTabsProxyConnectionId, }); } ProxyRoutingSettingCompanion copyWith({ Value? id, Value? regularTabsMode, Value? regularTabsProxyConnectionId, Value? privateTabsProxyConnectionId, }) { return ProxyRoutingSettingCompanion( id: id ?? this.id, regularTabsMode: regularTabsMode ?? this.regularTabsMode, regularTabsProxyConnectionId: regularTabsProxyConnectionId ?? this.regularTabsProxyConnectionId, privateTabsProxyConnectionId: privateTabsProxyConnectionId ?? this.privateTabsProxyConnectionId, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (regularTabsMode.present) { map['regular_tabs_mode'] = Variable(regularTabsMode.value); } if (regularTabsProxyConnectionId.present) { map['regular_tabs_proxy_connection_id'] = Variable( regularTabsProxyConnectionId.value, ); } if (privateTabsProxyConnectionId.present) { map['private_tabs_proxy_connection_id'] = Variable( privateTabsProxyConnectionId.value, ); } return map; } @override String toString() { return (StringBuffer('ProxyRoutingSettingCompanion(') ..write('id: $id, ') ..write('regularTabsMode: $regularTabsMode, ') ..write( 'regularTabsProxyConnectionId: $regularTabsProxyConnectionId, ', ) ..write('privateTabsProxyConnectionId: $privateTabsProxyConnectionId') ..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 ToolbarButtonConfigs extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; ToolbarButtonConfigs(this.attachedDatabase, [this._alias]); late final GeneratedColumn buttonId = GeneratedColumn( 'button_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL PRIMARY KEY', ); late final GeneratedColumn orderKey = GeneratedColumn( 'order_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn isVisible = GeneratedColumn( 'is_visible', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, $customConstraints: 'NOT NULL DEFAULT TRUE', defaultValue: const CustomExpression('TRUE'), ); late final GeneratedColumn fallbackId = GeneratedColumn( 'fallback_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, $customConstraints: 'REFERENCES toolbar_button_configs(button_id)ON DELETE SET NULL', ); @override List get $columns => [ buttonId, orderKey, isVisible, fallbackId, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'toolbar_button_configs'; @override Set get $primaryKey => {buttonId}; @override ToolbarButtonConfigsData map( Map data, { String? tablePrefix, }) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ToolbarButtonConfigsData( buttonId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}button_id'], )!, orderKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}order_key'], )!, isVisible: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}is_visible'], )!, fallbackId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}fallback_id'], ), ); } @override ToolbarButtonConfigs createAlias(String alias) { return ToolbarButtonConfigs(attachedDatabase, alias); } @override bool get dontWriteConstraints => true; } class ToolbarButtonConfigsData extends DataClass implements Insertable { final String buttonId; final String orderKey; final int isVisible; final String? fallbackId; const ToolbarButtonConfigsData({ required this.buttonId, required this.orderKey, required this.isVisible, this.fallbackId, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['button_id'] = Variable(buttonId); map['order_key'] = Variable(orderKey); map['is_visible'] = Variable(isVisible); if (!nullToAbsent || fallbackId != null) { map['fallback_id'] = Variable(fallbackId); } return map; } factory ToolbarButtonConfigsData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ToolbarButtonConfigsData( buttonId: serializer.fromJson(json['buttonId']), orderKey: serializer.fromJson(json['orderKey']), isVisible: serializer.fromJson(json['isVisible']), fallbackId: serializer.fromJson(json['fallbackId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'buttonId': serializer.toJson(buttonId), 'orderKey': serializer.toJson(orderKey), 'isVisible': serializer.toJson(isVisible), 'fallbackId': serializer.toJson(fallbackId), }; } ToolbarButtonConfigsData copyWith({ String? buttonId, String? orderKey, int? isVisible, Value fallbackId = const Value.absent(), }) => ToolbarButtonConfigsData( buttonId: buttonId ?? this.buttonId, orderKey: orderKey ?? this.orderKey, isVisible: isVisible ?? this.isVisible, fallbackId: fallbackId.present ? fallbackId.value : this.fallbackId, ); ToolbarButtonConfigsData copyWithCompanion( ToolbarButtonConfigsCompanion data, ) { return ToolbarButtonConfigsData( buttonId: data.buttonId.present ? data.buttonId.value : this.buttonId, orderKey: data.orderKey.present ? data.orderKey.value : this.orderKey, isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, fallbackId: data.fallbackId.present ? data.fallbackId.value : this.fallbackId, ); } @override String toString() { return (StringBuffer('ToolbarButtonConfigsData(') ..write('buttonId: $buttonId, ') ..write('orderKey: $orderKey, ') ..write('isVisible: $isVisible, ') ..write('fallbackId: $fallbackId') ..write(')')) .toString(); } @override int get hashCode => Object.hash(buttonId, orderKey, isVisible, fallbackId); @override bool operator ==(Object other) => identical(this, other) || (other is ToolbarButtonConfigsData && other.buttonId == this.buttonId && other.orderKey == this.orderKey && other.isVisible == this.isVisible && other.fallbackId == this.fallbackId); } class ToolbarButtonConfigsCompanion extends UpdateCompanion { final Value buttonId; final Value orderKey; final Value isVisible; final Value fallbackId; final Value rowid; const ToolbarButtonConfigsCompanion({ this.buttonId = const Value.absent(), this.orderKey = const Value.absent(), this.isVisible = const Value.absent(), this.fallbackId = const Value.absent(), this.rowid = const Value.absent(), }); ToolbarButtonConfigsCompanion.insert({ required String buttonId, required String orderKey, this.isVisible = const Value.absent(), this.fallbackId = const Value.absent(), this.rowid = const Value.absent(), }) : buttonId = Value(buttonId), orderKey = Value(orderKey); static Insertable custom({ Expression? buttonId, Expression? orderKey, Expression? isVisible, Expression? fallbackId, Expression? rowid, }) { return RawValuesInsertable({ if (buttonId != null) 'button_id': buttonId, if (orderKey != null) 'order_key': orderKey, if (isVisible != null) 'is_visible': isVisible, if (fallbackId != null) 'fallback_id': fallbackId, if (rowid != null) 'rowid': rowid, }); } ToolbarButtonConfigsCompanion copyWith({ Value? buttonId, Value? orderKey, Value? isVisible, Value? fallbackId, Value? rowid, }) { return ToolbarButtonConfigsCompanion( buttonId: buttonId ?? this.buttonId, orderKey: orderKey ?? this.orderKey, isVisible: isVisible ?? this.isVisible, fallbackId: fallbackId ?? this.fallbackId, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (buttonId.present) { map['button_id'] = Variable(buttonId.value); } if (orderKey.present) { map['order_key'] = Variable(orderKey.value); } if (isVisible.present) { map['is_visible'] = Variable(isVisible.value); } if (fallbackId.present) { map['fallback_id'] = Variable(fallbackId.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ToolbarButtonConfigsCompanion(') ..write('buttonId: $buttonId, ') ..write('orderKey: $orderKey, ') ..write('isVisible: $isVisible, ') ..write('fallbackId: $fallbackId, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class SearchTokens extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; SearchTokens(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, $customConstraints: 'PRIMARY KEY AUTOINCREMENT', ); late final GeneratedColumn token = GeneratedColumn( 'token', aliasedName, false, type: DriftSqlType.blob, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn insertedAt = GeneratedColumn( 'inserted_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn issuerKeyVersion = GeneratedColumn( 'issuer_key_version', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL', ); late final GeneratedColumn reservedAt = GeneratedColumn( 'reserved_at', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, $customConstraints: '', ); @override List get $columns => [ id, token, insertedAt, issuerKeyVersion, reservedAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'search_tokens'; @override Set get $primaryKey => {id}; @override SearchTokensData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SearchTokensData( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, token: attachedDatabase.typeMapping.read( DriftSqlType.blob, data['${effectivePrefix}token'], )!, insertedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}inserted_at'], )!, issuerKeyVersion: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}issuer_key_version'], )!, reservedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}reserved_at'], ), ); } @override SearchTokens createAlias(String alias) { return SearchTokens(attachedDatabase, alias); } @override bool get dontWriteConstraints => true; } class SearchTokensData extends DataClass implements Insertable { final int id; final i2.Uint8List token; final int insertedAt; final String issuerKeyVersion; final int? reservedAt; const SearchTokensData({ required this.id, required this.token, required this.insertedAt, required this.issuerKeyVersion, this.reservedAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['token'] = Variable(token); map['inserted_at'] = Variable(insertedAt); map['issuer_key_version'] = Variable(issuerKeyVersion); if (!nullToAbsent || reservedAt != null) { map['reserved_at'] = Variable(reservedAt); } return map; } factory SearchTokensData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return SearchTokensData( id: serializer.fromJson(json['id']), token: serializer.fromJson(json['token']), insertedAt: serializer.fromJson(json['insertedAt']), issuerKeyVersion: serializer.fromJson(json['issuerKeyVersion']), reservedAt: serializer.fromJson(json['reservedAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'token': serializer.toJson(token), 'insertedAt': serializer.toJson(insertedAt), 'issuerKeyVersion': serializer.toJson(issuerKeyVersion), 'reservedAt': serializer.toJson(reservedAt), }; } SearchTokensData copyWith({ int? id, i2.Uint8List? token, int? insertedAt, String? issuerKeyVersion, Value reservedAt = const Value.absent(), }) => SearchTokensData( id: id ?? this.id, token: token ?? this.token, insertedAt: insertedAt ?? this.insertedAt, issuerKeyVersion: issuerKeyVersion ?? this.issuerKeyVersion, reservedAt: reservedAt.present ? reservedAt.value : this.reservedAt, ); SearchTokensData copyWithCompanion(SearchTokensCompanion data) { return SearchTokensData( id: data.id.present ? data.id.value : this.id, token: data.token.present ? data.token.value : this.token, insertedAt: data.insertedAt.present ? data.insertedAt.value : this.insertedAt, issuerKeyVersion: data.issuerKeyVersion.present ? data.issuerKeyVersion.value : this.issuerKeyVersion, reservedAt: data.reservedAt.present ? data.reservedAt.value : this.reservedAt, ); } @override String toString() { return (StringBuffer('SearchTokensData(') ..write('id: $id, ') ..write('token: $token, ') ..write('insertedAt: $insertedAt, ') ..write('issuerKeyVersion: $issuerKeyVersion, ') ..write('reservedAt: $reservedAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, $driftBlobEquality.hash(token), insertedAt, issuerKeyVersion, reservedAt, ); @override bool operator ==(Object other) => identical(this, other) || (other is SearchTokensData && other.id == this.id && $driftBlobEquality.equals(other.token, this.token) && other.insertedAt == this.insertedAt && other.issuerKeyVersion == this.issuerKeyVersion && other.reservedAt == this.reservedAt); } class SearchTokensCompanion extends UpdateCompanion { final Value id; final Value token; final Value insertedAt; final Value issuerKeyVersion; final Value reservedAt; const SearchTokensCompanion({ this.id = const Value.absent(), this.token = const Value.absent(), this.insertedAt = const Value.absent(), this.issuerKeyVersion = const Value.absent(), this.reservedAt = const Value.absent(), }); SearchTokensCompanion.insert({ this.id = const Value.absent(), required i2.Uint8List token, required int insertedAt, required String issuerKeyVersion, this.reservedAt = const Value.absent(), }) : token = Value(token), insertedAt = Value(insertedAt), issuerKeyVersion = Value(issuerKeyVersion); static Insertable custom({ Expression? id, Expression? token, Expression? insertedAt, Expression? issuerKeyVersion, Expression? reservedAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (token != null) 'token': token, if (insertedAt != null) 'inserted_at': insertedAt, if (issuerKeyVersion != null) 'issuer_key_version': issuerKeyVersion, if (reservedAt != null) 'reserved_at': reservedAt, }); } SearchTokensCompanion copyWith({ Value? id, Value? token, Value? insertedAt, Value? issuerKeyVersion, Value? reservedAt, }) { return SearchTokensCompanion( id: id ?? this.id, token: token ?? this.token, insertedAt: insertedAt ?? this.insertedAt, issuerKeyVersion: issuerKeyVersion ?? this.issuerKeyVersion, reservedAt: reservedAt ?? this.reservedAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (token.present) { map['token'] = Variable(token.value); } if (insertedAt.present) { map['inserted_at'] = Variable(insertedAt.value); } if (issuerKeyVersion.present) { map['issuer_key_version'] = Variable(issuerKeyVersion.value); } if (reservedAt.present) { map['reserved_at'] = Variable(reservedAt.value); } return map; } @override String toString() { return (StringBuffer('SearchTokensCompanion(') ..write('id: $id, ') ..write('token: $token, ') ..write('insertedAt: $insertedAt, ') ..write('issuerKeyVersion: $issuerKeyVersion, ') ..write('reservedAt: $reservedAt') ..write(')')) .toString(); } } class DatabaseAtV7 extends GeneratedDatabase { DatabaseAtV7(QueryExecutor e) : super(e); late final Setting setting = Setting(this); late final ProxyProfile proxyProfile = ProxyProfile(this); late final Index idxProxyProfileUpdatedAt = Index( 'idx_proxy_profile_updated_at', 'CREATE INDEX idx_proxy_profile_updated_at ON proxy_profile (updated_at)', ); late final ProxyRoutingSetting proxyRoutingSetting = ProxyRoutingSetting( this, ); late final IconCache iconCache = IconCache(this); late final Onboarding onboarding = Onboarding(this); late final Riverpod riverpod = Riverpod(this); late final ToolbarButtonConfigs toolbarButtonConfigs = ToolbarButtonConfigs( this, ); late final Index idxToolbarOrderKey = Index( 'idx_toolbar_order_key', 'CREATE INDEX idx_toolbar_order_key ON toolbar_button_configs (order_key)', ); late final SearchTokens searchTokens = SearchTokens(this); late final Index idxSearchTokensInsertedAt = Index( 'idx_search_tokens_inserted_at', 'CREATE INDEX idx_search_tokens_inserted_at ON search_tokens (inserted_at)', ); late final Index idxSearchTokensReservedAt = Index( 'idx_search_tokens_reserved_at', 'CREATE INDEX idx_search_tokens_reserved_at ON search_tokens (reserved_at)', ); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ setting, proxyProfile, idxProxyProfileUpdatedAt, proxyRoutingSetting, iconCache, onboarding, riverpod, toolbarButtonConfigs, idxToolbarOrderKey, searchTokens, idxSearchTokensInsertedAt, idxSearchTokensReservedAt, ]; @override int get schemaVersion => 7; }