Files
MrbWebLibre/apps/weblibre/test/drift/user/generated/schema_v9.dart
T

2161 lines
65 KiB
Dart

// 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<Setting, SettingData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
Setting(this.attachedDatabase, [this._alias]);
late final GeneratedColumn<String> key = GeneratedColumn<String>(
'key',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'PRIMARY KEY NOT NULL',
);
late final GeneratedColumn<String> partitionKey = GeneratedColumn<String>(
'partition_key',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
$customConstraints: '',
);
late final GeneratedColumn<DriftAny> value = GeneratedColumn<DriftAny>(
'value',
aliasedName,
true,
type: DriftSqlType.any,
requiredDuringInsert: false,
$customConstraints: '',
);
@override
List<GeneratedColumn> get $columns => [key, partitionKey, value];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'setting';
@override
Set<GeneratedColumn> get $primaryKey => {key};
@override
SettingData map(Map<String, dynamic> 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<SettingData> {
final String key;
final String? partitionKey;
final DriftAny? value;
const SettingData({required this.key, this.partitionKey, this.value});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['key'] = Variable<String>(key);
if (!nullToAbsent || partitionKey != null) {
map['partition_key'] = Variable<String>(partitionKey);
}
if (!nullToAbsent || value != null) {
map['value'] = Variable<DriftAny>(value);
}
return map;
}
factory SettingData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return SettingData(
key: serializer.fromJson<String>(json['key']),
partitionKey: serializer.fromJson<String?>(json['partitionKey']),
value: serializer.fromJson<DriftAny?>(json['value']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'key': serializer.toJson<String>(key),
'partitionKey': serializer.toJson<String?>(partitionKey),
'value': serializer.toJson<DriftAny?>(value),
};
}
SettingData copyWith({
String? key,
Value<String?> partitionKey = const Value.absent(),
Value<DriftAny?> 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<SettingData> {
final Value<String> key;
final Value<String?> partitionKey;
final Value<DriftAny?> value;
final Value<int> 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<SettingData> custom({
Expression<String>? key,
Expression<String>? partitionKey,
Expression<DriftAny>? value,
Expression<int>? 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<String>? key,
Value<String?>? partitionKey,
Value<DriftAny?>? value,
Value<int>? rowid,
}) {
return SettingCompanion(
key: key ?? this.key,
partitionKey: partitionKey ?? this.partitionKey,
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 (partitionKey.present) {
map['partition_key'] = Variable<String>(partitionKey.value);
}
if (value.present) {
map['value'] = Variable<DriftAny>(value.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(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<ProxyProfile, ProxyProfileData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
ProxyProfile(this.attachedDatabase, [this._alias]);
late final GeneratedColumn<String> id = GeneratedColumn<String>(
'id',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL PRIMARY KEY',
);
late final GeneratedColumn<String> name = GeneratedColumn<String>(
'name',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<String> type = GeneratedColumn<String>(
'type',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<String> configJson = GeneratedColumn<String>(
'config_json',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<String> dnsOverrideJson = GeneratedColumn<String>(
'dns_override_json',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
$customConstraints: '',
);
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
'created_at',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: false,
$customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
);
late final GeneratedColumn<int> updatedAt = GeneratedColumn<int>(
'updated_at',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: false,
$customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
);
@override
List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {id};
@override
ProxyProfileData map(Map<String, dynamic> 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<ProxyProfileData> {
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<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<String>(id);
map['name'] = Variable<String>(name);
map['type'] = Variable<String>(type);
map['config_json'] = Variable<String>(configJson);
if (!nullToAbsent || dnsOverrideJson != null) {
map['dns_override_json'] = Variable<String>(dnsOverrideJson);
}
map['created_at'] = Variable<int>(createdAt);
map['updated_at'] = Variable<int>(updatedAt);
return map;
}
factory ProxyProfileData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return ProxyProfileData(
id: serializer.fromJson<String>(json['id']),
name: serializer.fromJson<String>(json['name']),
type: serializer.fromJson<String>(json['type']),
configJson: serializer.fromJson<String>(json['configJson']),
dnsOverrideJson: serializer.fromJson<String?>(json['dnsOverrideJson']),
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<String>(id),
'name': serializer.toJson<String>(name),
'type': serializer.toJson<String>(type),
'configJson': serializer.toJson<String>(configJson),
'dnsOverrideJson': serializer.toJson<String?>(dnsOverrideJson),
'createdAt': serializer.toJson<int>(createdAt),
'updatedAt': serializer.toJson<int>(updatedAt),
};
}
ProxyProfileData copyWith({
String? id,
String? name,
String? type,
String? configJson,
Value<String?> 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<ProxyProfileData> {
final Value<String> id;
final Value<String> name;
final Value<String> type;
final Value<String> configJson;
final Value<String?> dnsOverrideJson;
final Value<int> createdAt;
final Value<int> updatedAt;
final Value<int> 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<ProxyProfileData> custom({
Expression<String>? id,
Expression<String>? name,
Expression<String>? type,
Expression<String>? configJson,
Expression<String>? dnsOverrideJson,
Expression<int>? createdAt,
Expression<int>? updatedAt,
Expression<int>? 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<String>? id,
Value<String>? name,
Value<String>? type,
Value<String>? configJson,
Value<String?>? dnsOverrideJson,
Value<int>? createdAt,
Value<int>? updatedAt,
Value<int>? 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<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 (type.present) {
map['type'] = Variable<String>(type.value);
}
if (configJson.present) {
map['config_json'] = Variable<String>(configJson.value);
}
if (dnsOverrideJson.present) {
map['dns_override_json'] = Variable<String>(dnsOverrideJson.value);
}
if (createdAt.present) {
map['created_at'] = Variable<int>(createdAt.value);
}
if (updatedAt.present) {
map['updated_at'] = Variable<int>(updatedAt.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(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 IconCache extends Table with TableInfo<IconCache, IconCacheData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
IconCache(this.attachedDatabase, [this._alias]);
late final GeneratedColumn<String> origin = GeneratedColumn<String>(
'origin',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'PRIMARY KEY NOT NULL',
);
late final GeneratedColumn<i2.Uint8List> iconData =
GeneratedColumn<i2.Uint8List>(
'icon_data',
aliasedName,
false,
type: DriftSqlType.blob,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<int> fetchDate = GeneratedColumn<int>(
'fetch_date',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
@override
List<GeneratedColumn> get $columns => [origin, iconData, fetchDate];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'icon_cache';
@override
Set<GeneratedColumn> get $primaryKey => {origin};
@override
IconCacheData map(Map<String, dynamic> 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<IconCacheData> {
final String origin;
final i2.Uint8List iconData;
final int fetchDate;
const IconCacheData({
required this.origin,
required this.iconData,
required this.fetchDate,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['origin'] = Variable<String>(origin);
map['icon_data'] = Variable<i2.Uint8List>(iconData);
map['fetch_date'] = Variable<int>(fetchDate);
return map;
}
factory IconCacheData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return IconCacheData(
origin: serializer.fromJson<String>(json['origin']),
iconData: serializer.fromJson<i2.Uint8List>(json['iconData']),
fetchDate: serializer.fromJson<int>(json['fetchDate']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'origin': serializer.toJson<String>(origin),
'iconData': serializer.toJson<i2.Uint8List>(iconData),
'fetchDate': serializer.toJson<int>(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<IconCacheData> {
final Value<String> origin;
final Value<i2.Uint8List> iconData;
final Value<int> fetchDate;
final Value<int> 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<IconCacheData> custom({
Expression<String>? origin,
Expression<i2.Uint8List>? iconData,
Expression<int>? fetchDate,
Expression<int>? 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<String>? origin,
Value<i2.Uint8List>? iconData,
Value<int>? fetchDate,
Value<int>? rowid,
}) {
return IconCacheCompanion(
origin: origin ?? this.origin,
iconData: iconData ?? this.iconData,
fetchDate: fetchDate ?? this.fetchDate,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (origin.present) {
map['origin'] = Variable<String>(origin.value);
}
if (iconData.present) {
map['icon_data'] = Variable<i2.Uint8List>(iconData.value);
}
if (fetchDate.present) {
map['fetch_date'] = Variable<int>(fetchDate.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(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<Onboarding, OnboardingData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
Onboarding(this.attachedDatabase, [this._alias]);
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<int> completionDate = GeneratedColumn<int>(
'completion_date',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
@override
List<GeneratedColumn> get $columns => [revision, completionDate];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'onboarding';
@override
Set<GeneratedColumn> get $primaryKey => const {};
@override
OnboardingData map(Map<String, dynamic> 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<OnboardingData> {
final int revision;
final int completionDate;
const OnboardingData({required this.revision, required this.completionDate});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['revision'] = Variable<int>(revision);
map['completion_date'] = Variable<int>(completionDate);
return map;
}
factory OnboardingData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return OnboardingData(
revision: serializer.fromJson<int>(json['revision']),
completionDate: serializer.fromJson<int>(json['completionDate']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'revision': serializer.toJson<int>(revision),
'completionDate': serializer.toJson<int>(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<OnboardingData> {
final Value<int> revision;
final Value<int> completionDate;
final Value<int> 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<OnboardingData> custom({
Expression<int>? revision,
Expression<int>? completionDate,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (revision != null) 'revision': revision,
if (completionDate != null) 'completion_date': completionDate,
if (rowid != null) 'rowid': rowid,
});
}
OnboardingCompanion copyWith({
Value<int>? revision,
Value<int>? completionDate,
Value<int>? rowid,
}) {
return OnboardingCompanion(
revision: revision ?? this.revision,
completionDate: completionDate ?? this.completionDate,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (completionDate.present) {
map['completion_date'] = Variable<int>(completionDate.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(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<Riverpod, RiverpodData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
Riverpod(this.attachedDatabase, [this._alias]);
late final GeneratedColumn<String> key = GeneratedColumn<String>(
'key',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'PRIMARY KEY NOT NULL',
);
late final GeneratedColumn<String> json = GeneratedColumn<String>(
'json',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<int> expireAt = GeneratedColumn<int>(
'expireAt',
aliasedName,
true,
type: DriftSqlType.int,
requiredDuringInsert: false,
$customConstraints: '',
);
late final GeneratedColumn<String> destroyKey = GeneratedColumn<String>(
'destroyKey',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
$customConstraints: '',
);
@override
List<GeneratedColumn> get $columns => [key, json, expireAt, destroyKey];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'riverpod';
@override
Set<GeneratedColumn> get $primaryKey => {key};
@override
RiverpodData map(Map<String, dynamic> 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<RiverpodData> {
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<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['key'] = Variable<String>(key);
map['json'] = Variable<String>(json);
if (!nullToAbsent || expireAt != null) {
map['expireAt'] = Variable<int>(expireAt);
}
if (!nullToAbsent || destroyKey != null) {
map['destroyKey'] = Variable<String>(destroyKey);
}
return map;
}
factory RiverpodData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return RiverpodData(
key: serializer.fromJson<String>(json['key']),
json: serializer.fromJson<String>(json['json']),
expireAt: serializer.fromJson<int?>(json['expireAt']),
destroyKey: serializer.fromJson<String?>(json['destroyKey']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'key': serializer.toJson<String>(key),
'json': serializer.toJson<String>(json),
'expireAt': serializer.toJson<int?>(expireAt),
'destroyKey': serializer.toJson<String?>(destroyKey),
};
}
RiverpodData copyWith({
String? key,
String? json,
Value<int?> expireAt = const Value.absent(),
Value<String?> 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<RiverpodData> {
final Value<String> key;
final Value<String> json;
final Value<int?> expireAt;
final Value<String?> 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<RiverpodData> custom({
Expression<String>? key,
Expression<String>? json,
Expression<int>? expireAt,
Expression<String>? 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<String>? key,
Value<String>? json,
Value<int?>? expireAt,
Value<String?>? destroyKey,
}) {
return RiverpodCompanion(
key: key ?? this.key,
json: json ?? this.json,
expireAt: expireAt ?? this.expireAt,
destroyKey: destroyKey ?? this.destroyKey,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (key.present) {
map['key'] = Variable<String>(key.value);
}
if (json.present) {
map['json'] = Variable<String>(json.value);
}
if (expireAt.present) {
map['expireAt'] = Variable<int>(expireAt.value);
}
if (destroyKey.present) {
map['destroyKey'] = Variable<String>(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<ToolbarButtonConfigs, ToolbarButtonConfigsData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
ToolbarButtonConfigs(this.attachedDatabase, [this._alias]);
late final GeneratedColumn<String> buttonId = GeneratedColumn<String>(
'button_id',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL PRIMARY KEY',
);
late final GeneratedColumn<String> orderKey = GeneratedColumn<String>(
'order_key',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<int> isVisible = GeneratedColumn<int>(
'is_visible',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: false,
$customConstraints: 'NOT NULL DEFAULT TRUE',
defaultValue: const CustomExpression('TRUE'),
);
late final GeneratedColumn<String> fallbackId = GeneratedColumn<String>(
'fallback_id',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
$customConstraints:
'REFERENCES toolbar_button_configs(button_id)ON DELETE SET NULL',
);
@override
List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {buttonId};
@override
ToolbarButtonConfigsData map(
Map<String, dynamic> 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<ToolbarButtonConfigsData> {
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<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['button_id'] = Variable<String>(buttonId);
map['order_key'] = Variable<String>(orderKey);
map['is_visible'] = Variable<int>(isVisible);
if (!nullToAbsent || fallbackId != null) {
map['fallback_id'] = Variable<String>(fallbackId);
}
return map;
}
factory ToolbarButtonConfigsData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return ToolbarButtonConfigsData(
buttonId: serializer.fromJson<String>(json['buttonId']),
orderKey: serializer.fromJson<String>(json['orderKey']),
isVisible: serializer.fromJson<int>(json['isVisible']),
fallbackId: serializer.fromJson<String?>(json['fallbackId']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'buttonId': serializer.toJson<String>(buttonId),
'orderKey': serializer.toJson<String>(orderKey),
'isVisible': serializer.toJson<int>(isVisible),
'fallbackId': serializer.toJson<String?>(fallbackId),
};
}
ToolbarButtonConfigsData copyWith({
String? buttonId,
String? orderKey,
int? isVisible,
Value<String?> 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<ToolbarButtonConfigsData> {
final Value<String> buttonId;
final Value<String> orderKey;
final Value<int> isVisible;
final Value<String?> fallbackId;
final Value<int> 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<ToolbarButtonConfigsData> custom({
Expression<String>? buttonId,
Expression<String>? orderKey,
Expression<int>? isVisible,
Expression<String>? fallbackId,
Expression<int>? 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<String>? buttonId,
Value<String>? orderKey,
Value<int>? isVisible,
Value<String?>? fallbackId,
Value<int>? 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<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (buttonId.present) {
map['button_id'] = Variable<String>(buttonId.value);
}
if (orderKey.present) {
map['order_key'] = Variable<String>(orderKey.value);
}
if (isVisible.present) {
map['is_visible'] = Variable<int>(isVisible.value);
}
if (fallbackId.present) {
map['fallback_id'] = Variable<String>(fallbackId.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(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 QuickSwitcherButtonConfigs extends Table
with TableInfo<QuickSwitcherButtonConfigs, QuickSwitcherButtonConfigsData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
QuickSwitcherButtonConfigs(this.attachedDatabase, [this._alias]);
late final GeneratedColumn<String> buttonId = GeneratedColumn<String>(
'button_id',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL PRIMARY KEY',
);
late final GeneratedColumn<String> orderKey = GeneratedColumn<String>(
'order_key',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<int> isVisible = GeneratedColumn<int>(
'is_visible',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: false,
$customConstraints: 'NOT NULL DEFAULT FALSE',
defaultValue: const CustomExpression('FALSE'),
);
late final GeneratedColumn<String> fallbackId = GeneratedColumn<String>(
'fallback_id',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
$customConstraints:
'REFERENCES quick_switcher_button_configs(button_id)ON DELETE SET NULL',
);
@override
List<GeneratedColumn> get $columns => [
buttonId,
orderKey,
isVisible,
fallbackId,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'quick_switcher_button_configs';
@override
Set<GeneratedColumn> get $primaryKey => {buttonId};
@override
QuickSwitcherButtonConfigsData map(
Map<String, dynamic> data, {
String? tablePrefix,
}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return QuickSwitcherButtonConfigsData(
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
QuickSwitcherButtonConfigs createAlias(String alias) {
return QuickSwitcherButtonConfigs(attachedDatabase, alias);
}
@override
bool get dontWriteConstraints => true;
}
class QuickSwitcherButtonConfigsData extends DataClass
implements Insertable<QuickSwitcherButtonConfigsData> {
final String buttonId;
final String orderKey;
final int isVisible;
final String? fallbackId;
const QuickSwitcherButtonConfigsData({
required this.buttonId,
required this.orderKey,
required this.isVisible,
this.fallbackId,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['button_id'] = Variable<String>(buttonId);
map['order_key'] = Variable<String>(orderKey);
map['is_visible'] = Variable<int>(isVisible);
if (!nullToAbsent || fallbackId != null) {
map['fallback_id'] = Variable<String>(fallbackId);
}
return map;
}
factory QuickSwitcherButtonConfigsData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return QuickSwitcherButtonConfigsData(
buttonId: serializer.fromJson<String>(json['buttonId']),
orderKey: serializer.fromJson<String>(json['orderKey']),
isVisible: serializer.fromJson<int>(json['isVisible']),
fallbackId: serializer.fromJson<String?>(json['fallbackId']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'buttonId': serializer.toJson<String>(buttonId),
'orderKey': serializer.toJson<String>(orderKey),
'isVisible': serializer.toJson<int>(isVisible),
'fallbackId': serializer.toJson<String?>(fallbackId),
};
}
QuickSwitcherButtonConfigsData copyWith({
String? buttonId,
String? orderKey,
int? isVisible,
Value<String?> fallbackId = const Value.absent(),
}) => QuickSwitcherButtonConfigsData(
buttonId: buttonId ?? this.buttonId,
orderKey: orderKey ?? this.orderKey,
isVisible: isVisible ?? this.isVisible,
fallbackId: fallbackId.present ? fallbackId.value : this.fallbackId,
);
QuickSwitcherButtonConfigsData copyWithCompanion(
QuickSwitcherButtonConfigsCompanion data,
) {
return QuickSwitcherButtonConfigsData(
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('QuickSwitcherButtonConfigsData(')
..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 QuickSwitcherButtonConfigsData &&
other.buttonId == this.buttonId &&
other.orderKey == this.orderKey &&
other.isVisible == this.isVisible &&
other.fallbackId == this.fallbackId);
}
class QuickSwitcherButtonConfigsCompanion
extends UpdateCompanion<QuickSwitcherButtonConfigsData> {
final Value<String> buttonId;
final Value<String> orderKey;
final Value<int> isVisible;
final Value<String?> fallbackId;
final Value<int> rowid;
const QuickSwitcherButtonConfigsCompanion({
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(),
});
QuickSwitcherButtonConfigsCompanion.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<QuickSwitcherButtonConfigsData> custom({
Expression<String>? buttonId,
Expression<String>? orderKey,
Expression<int>? isVisible,
Expression<String>? fallbackId,
Expression<int>? 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,
});
}
QuickSwitcherButtonConfigsCompanion copyWith({
Value<String>? buttonId,
Value<String>? orderKey,
Value<int>? isVisible,
Value<String?>? fallbackId,
Value<int>? rowid,
}) {
return QuickSwitcherButtonConfigsCompanion(
buttonId: buttonId ?? this.buttonId,
orderKey: orderKey ?? this.orderKey,
isVisible: isVisible ?? this.isVisible,
fallbackId: fallbackId ?? this.fallbackId,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (buttonId.present) {
map['button_id'] = Variable<String>(buttonId.value);
}
if (orderKey.present) {
map['order_key'] = Variable<String>(orderKey.value);
}
if (isVisible.present) {
map['is_visible'] = Variable<int>(isVisible.value);
}
if (fallbackId.present) {
map['fallback_id'] = Variable<String>(fallbackId.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('QuickSwitcherButtonConfigsCompanion(')
..write('buttonId: $buttonId, ')
..write('orderKey: $orderKey, ')
..write('isVisible: $isVisible, ')
..write('fallbackId: $fallbackId, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class SearchTokens extends Table
with TableInfo<SearchTokens, SearchTokensData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
SearchTokens(this.attachedDatabase, [this._alias]);
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id',
aliasedName,
false,
hasAutoIncrement: true,
type: DriftSqlType.int,
requiredDuringInsert: false,
$customConstraints: 'PRIMARY KEY AUTOINCREMENT',
);
late final GeneratedColumn<i2.Uint8List> token =
GeneratedColumn<i2.Uint8List>(
'token',
aliasedName,
false,
type: DriftSqlType.blob,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<int> insertedAt = GeneratedColumn<int>(
'inserted_at',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<String> issuerKeyVersion = GeneratedColumn<String>(
'issuer_key_version',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
$customConstraints: 'NOT NULL',
);
late final GeneratedColumn<int> reservedAt = GeneratedColumn<int>(
'reserved_at',
aliasedName,
true,
type: DriftSqlType.int,
requiredDuringInsert: false,
$customConstraints: '',
);
@override
List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {id};
@override
SearchTokensData map(Map<String, dynamic> 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<SearchTokensData> {
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<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['token'] = Variable<i2.Uint8List>(token);
map['inserted_at'] = Variable<int>(insertedAt);
map['issuer_key_version'] = Variable<String>(issuerKeyVersion);
if (!nullToAbsent || reservedAt != null) {
map['reserved_at'] = Variable<int>(reservedAt);
}
return map;
}
factory SearchTokensData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return SearchTokensData(
id: serializer.fromJson<int>(json['id']),
token: serializer.fromJson<i2.Uint8List>(json['token']),
insertedAt: serializer.fromJson<int>(json['insertedAt']),
issuerKeyVersion: serializer.fromJson<String>(json['issuerKeyVersion']),
reservedAt: serializer.fromJson<int?>(json['reservedAt']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'token': serializer.toJson<i2.Uint8List>(token),
'insertedAt': serializer.toJson<int>(insertedAt),
'issuerKeyVersion': serializer.toJson<String>(issuerKeyVersion),
'reservedAt': serializer.toJson<int?>(reservedAt),
};
}
SearchTokensData copyWith({
int? id,
i2.Uint8List? token,
int? insertedAt,
String? issuerKeyVersion,
Value<int?> 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<SearchTokensData> {
final Value<int> id;
final Value<i2.Uint8List> token;
final Value<int> insertedAt;
final Value<String> issuerKeyVersion;
final Value<int?> 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<SearchTokensData> custom({
Expression<int>? id,
Expression<i2.Uint8List>? token,
Expression<int>? insertedAt,
Expression<String>? issuerKeyVersion,
Expression<int>? 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<int>? id,
Value<i2.Uint8List>? token,
Value<int>? insertedAt,
Value<String>? issuerKeyVersion,
Value<int?>? 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<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (token.present) {
map['token'] = Variable<i2.Uint8List>(token.value);
}
if (insertedAt.present) {
map['inserted_at'] = Variable<int>(insertedAt.value);
}
if (issuerKeyVersion.present) {
map['issuer_key_version'] = Variable<String>(issuerKeyVersion.value);
}
if (reservedAt.present) {
map['reserved_at'] = Variable<int>(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 DatabaseAtV9 extends GeneratedDatabase {
DatabaseAtV9(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 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 QuickSwitcherButtonConfigs quickSwitcherButtonConfigs =
QuickSwitcherButtonConfigs(this);
late final Index idxQuickSwitcherOrderKey = Index(
'idx_quick_switcher_order_key',
'CREATE INDEX idx_quick_switcher_order_key ON quick_switcher_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<TableInfo<Table, Object?>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override
List<DatabaseSchemaEntity> get allSchemaEntities => [
setting,
proxyProfile,
idxProxyProfileUpdatedAt,
iconCache,
onboarding,
riverpod,
toolbarButtonConfigs,
idxToolbarOrderKey,
quickSwitcherButtonConfigs,
idxQuickSwitcherOrderKey,
searchTokens,
idxSearchTokensInsertedAt,
idxSearchTokensReservedAt,
];
@override
int get schemaVersion => 9;
}