// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ignore_for_file: type=lint class $NoteTableTable extends NoteTable with TableInfo<$NoteTableTable, NoteTableData> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $NoteTableTable(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 = 'note_table'; @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 NoteTableData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return NoteTableData( id: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}id'])!, content: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}content'])!, ); } @override $NoteTableTable createAlias(String alias) { return $NoteTableTable(attachedDatabase, alias); } } class NoteTableData extends DataClass implements Insertable { final String id; final String content; const NoteTableData({required this.id, required this.content}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['content'] = Variable(content); return map; } NoteTableCompanion toCompanion(bool nullToAbsent) { return NoteTableCompanion( id: Value(id), content: Value(content), ); } factory NoteTableData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return NoteTableData( 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), }; } NoteTableData copyWith({String? id, String? content}) => NoteTableData( id: id ?? this.id, content: content ?? this.content, ); @override String toString() { return (StringBuffer('NoteTableData(') ..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 NoteTableData && other.id == this.id && other.content == this.content); } class NoteTableCompanion extends UpdateCompanion { final Value id; final Value content; final Value rowid; const NoteTableCompanion({ this.id = const Value.absent(), this.content = const Value.absent(), this.rowid = const Value.absent(), }); NoteTableCompanion.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, }); } NoteTableCompanion copyWith( {Value? id, Value? content, Value? rowid}) { return NoteTableCompanion( 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('NoteTableCompanion(') ..write('id: $id, ') ..write('content: $content, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } abstract class _$AppDatabase extends GeneratedDatabase { _$AppDatabase(QueryExecutor e) : super(e); late final $NoteTableTable noteTable = $NoteTableTable(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [noteTable]; }