// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ignore_for_file: type=lint class $PersistentNoteTable extends PersistentNote with TableInfo<$PersistentNoteTable, PersistentNoteData> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $PersistentNoteTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _contentMeta = const VerificationMeta('content'); @override late final GeneratedColumn content = GeneratedColumn( 'content', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); @override List get $columns => [id, content]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'persistent_note'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('content')) { context.handle(_contentMeta, content.isAcceptableOrUnknown(data['content']!, _contentMeta)); } else if (isInserting) { context.missing(_contentMeta); } return context; } @override Set get $primaryKey => const {}; @override PersistentNoteData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return PersistentNoteData( id: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}id'])!, content: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}content'])!, ); } @override $PersistentNoteTable createAlias(String alias) { return $PersistentNoteTable(attachedDatabase, alias); } } class PersistentNoteData extends DataClass implements Insertable { final String id; final String content; const PersistentNoteData({required this.id, required this.content}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['content'] = Variable(content); return map; } PersistentNoteCompanion toCompanion(bool nullToAbsent) { return PersistentNoteCompanion( id: Value(id), content: Value(content), ); } factory PersistentNoteData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return PersistentNoteData( id: serializer.fromJson(json['id']), content: serializer.fromJson(json['content']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'content': serializer.toJson(content), }; } PersistentNoteData copyWith({String? id, String? content}) => PersistentNoteData( id: id ?? this.id, content: content ?? this.content, ); @override String toString() { return (StringBuffer('PersistentNoteData(') ..write('id: $id, ') ..write('content: $content') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, content); @override bool operator ==(Object other) => identical(this, other) || (other is PersistentNoteData && other.id == this.id && other.content == this.content); } class PersistentNoteCompanion extends UpdateCompanion { final Value id; final Value content; final Value rowid; const PersistentNoteCompanion({ this.id = const Value.absent(), this.content = const Value.absent(), this.rowid = const Value.absent(), }); PersistentNoteCompanion.insert({ required String id, required String content, this.rowid = const Value.absent(), }) : id = Value(id), content = Value(content); static Insertable custom({ Expression? id, Expression? content, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (content != null) 'content': content, if (rowid != null) 'rowid': rowid, }); } PersistentNoteCompanion copyWith( {Value? id, Value? content, Value? rowid}) { return PersistentNoteCompanion( id: id ?? this.id, content: content ?? this.content, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (content.present) { map['content'] = Variable(content.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('PersistentNoteCompanion(') ..write('id: $id, ') ..write('content: $content, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $PersistentThemeTable extends PersistentTheme with TableInfo<$PersistentThemeTable, PersistentThemeData> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $PersistentThemeTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _brightnessMeta = const VerificationMeta('brightness'); @override late final GeneratedColumn brightness = GeneratedColumn( 'brightness', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant("dark")); @override List get $columns => [brightness]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'persistent_theme'; @override VerificationContext validateIntegrity( Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('brightness')) { context.handle( _brightnessMeta, brightness.isAcceptableOrUnknown( data['brightness']!, _brightnessMeta)); } return context; } @override Set get $primaryKey => const {}; @override PersistentThemeData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return PersistentThemeData( brightness: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}brightness'])!, ); } @override $PersistentThemeTable createAlias(String alias) { return $PersistentThemeTable(attachedDatabase, alias); } } class PersistentThemeData extends DataClass implements Insertable { final String brightness; const PersistentThemeData({required this.brightness}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['brightness'] = Variable(brightness); return map; } PersistentThemeCompanion toCompanion(bool nullToAbsent) { return PersistentThemeCompanion( brightness: Value(brightness), ); } factory PersistentThemeData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return PersistentThemeData( brightness: serializer.fromJson(json['brightness']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'brightness': serializer.toJson(brightness), }; } PersistentThemeData copyWith({String? brightness}) => PersistentThemeData( brightness: brightness ?? this.brightness, ); @override String toString() { return (StringBuffer('PersistentThemeData(') ..write('brightness: $brightness') ..write(')')) .toString(); } @override int get hashCode => brightness.hashCode; @override bool operator ==(Object other) => identical(this, other) || (other is PersistentThemeData && other.brightness == this.brightness); } class PersistentThemeCompanion extends UpdateCompanion { final Value brightness; final Value rowid; const PersistentThemeCompanion({ this.brightness = const Value.absent(), this.rowid = const Value.absent(), }); PersistentThemeCompanion.insert({ this.brightness = const Value.absent(), this.rowid = const Value.absent(), }); static Insertable custom({ Expression? brightness, Expression? rowid, }) { return RawValuesInsertable({ if (brightness != null) 'brightness': brightness, if (rowid != null) 'rowid': rowid, }); } PersistentThemeCompanion copyWith( {Value? brightness, Value? rowid}) { return PersistentThemeCompanion( brightness: brightness ?? this.brightness, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (brightness.present) { map['brightness'] = Variable(brightness.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('PersistentThemeCompanion(') ..write('brightness: $brightness, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } abstract class _$AppDatabase extends GeneratedDatabase { _$AppDatabase(QueryExecutor e) : super(e); late final $PersistentNoteTable persistentNote = $PersistentNoteTable(this); late final $PersistentThemeTable persistentTheme = $PersistentThemeTable(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [persistentNote, persistentTheme]; }