// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ignore_for_file: type=lint class $LocalMessageEventTableTable extends LocalMessageEventTable with TableInfo<$LocalMessageEventTableTable, LocalMessageEventTableData> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $LocalMessageEventTableTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); static const VerificationMeta _channelIdMeta = const VerificationMeta('channelId'); @override late final GeneratedColumn channelId = GeneratedColumn( 'channel_id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); static const VerificationMeta _dataMeta = const VerificationMeta('data'); @override late final GeneratedColumnWithTypeConverter data = GeneratedColumn('data', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true) .withConverter($LocalMessageEventTableTable.$converterdata); static const VerificationMeta _createdAtMeta = const VerificationMeta('createdAt'); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: Constant(DateTime.now())); @override List get $columns => [id, channelId, data, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'local_message_event_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)); } if (data.containsKey('channel_id')) { context.handle(_channelIdMeta, channelId.isAcceptableOrUnknown(data['channel_id']!, _channelIdMeta)); } else if (isInserting) { context.missing(_channelIdMeta); } context.handle(_dataMeta, const VerificationResult.success()); if (data.containsKey('created_at')) { context.handle(_createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); } return context; } @override Set get $primaryKey => {id}; @override LocalMessageEventTableData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return LocalMessageEventTableData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, channelId: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}channel_id'])!, data: $LocalMessageEventTableTable.$converterdata.fromSql(attachedDatabase .typeMapping .read(DriftSqlType.string, data['${effectivePrefix}data'])!), createdAt: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, ); } @override $LocalMessageEventTableTable createAlias(String alias) { return $LocalMessageEventTableTable(attachedDatabase, alias); } static TypeConverter $converterdata = const MessageEventConverter(); } class LocalMessageEventTableData extends DataClass implements Insertable { final int id; final int channelId; final Event? data; final DateTime createdAt; const LocalMessageEventTableData( {required this.id, required this.channelId, this.data, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['channel_id'] = Variable(channelId); if (!nullToAbsent || data != null) { map['data'] = Variable( $LocalMessageEventTableTable.$converterdata.toSql(data)); } map['created_at'] = Variable(createdAt); return map; } LocalMessageEventTableCompanion toCompanion(bool nullToAbsent) { return LocalMessageEventTableCompanion( id: Value(id), channelId: Value(channelId), data: data == null && nullToAbsent ? const Value.absent() : Value(data), createdAt: Value(createdAt), ); } factory LocalMessageEventTableData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return LocalMessageEventTableData( id: serializer.fromJson(json['id']), channelId: serializer.fromJson(json['channelId']), data: serializer.fromJson(json['data']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'channelId': serializer.toJson(channelId), 'data': serializer.toJson(data), 'createdAt': serializer.toJson(createdAt), }; } LocalMessageEventTableData copyWith( {int? id, int? channelId, Value data = const Value.absent(), DateTime? createdAt}) => LocalMessageEventTableData( id: id ?? this.id, channelId: channelId ?? this.channelId, data: data.present ? data.value : this.data, createdAt: createdAt ?? this.createdAt, ); LocalMessageEventTableData copyWithCompanion( LocalMessageEventTableCompanion data) { return LocalMessageEventTableData( id: data.id.present ? data.id.value : this.id, channelId: data.channelId.present ? data.channelId.value : this.channelId, data: data.data.present ? data.data.value : this.data, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('LocalMessageEventTableData(') ..write('id: $id, ') ..write('channelId: $channelId, ') ..write('data: $data, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, channelId, data, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is LocalMessageEventTableData && other.id == this.id && other.channelId == this.channelId && other.data == this.data && other.createdAt == this.createdAt); } class LocalMessageEventTableCompanion extends UpdateCompanion { final Value id; final Value channelId; final Value data; final Value createdAt; const LocalMessageEventTableCompanion({ this.id = const Value.absent(), this.channelId = const Value.absent(), this.data = const Value.absent(), this.createdAt = const Value.absent(), }); LocalMessageEventTableCompanion.insert({ this.id = const Value.absent(), required int channelId, required Event? data, this.createdAt = const Value.absent(), }) : channelId = Value(channelId), data = Value(data); static Insertable custom({ Expression? id, Expression? channelId, Expression? data, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (channelId != null) 'channel_id': channelId, if (data != null) 'data': data, if (createdAt != null) 'created_at': createdAt, }); } LocalMessageEventTableCompanion copyWith( {Value? id, Value? channelId, Value? data, Value? createdAt}) { return LocalMessageEventTableCompanion( id: id ?? this.id, channelId: channelId ?? this.channelId, data: data ?? this.data, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (channelId.present) { map['channel_id'] = Variable(channelId.value); } if (data.present) { map['data'] = Variable( $LocalMessageEventTableTable.$converterdata.toSql(data.value)); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('LocalMessageEventTableCompanion(') ..write('id: $id, ') ..write('channelId: $channelId, ') ..write('data: $data, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } abstract class _$AppDatabase extends GeneratedDatabase { _$AppDatabase(QueryExecutor e) : super(e); $AppDatabaseManager get managers => $AppDatabaseManager(this); late final $LocalMessageEventTableTable localMessageEventTable = $LocalMessageEventTableTable(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [localMessageEventTable]; } typedef $$LocalMessageEventTableTableCreateCompanionBuilder = LocalMessageEventTableCompanion Function({ Value id, required int channelId, required Event? data, Value createdAt, }); typedef $$LocalMessageEventTableTableUpdateCompanionBuilder = LocalMessageEventTableCompanion Function({ Value id, Value channelId, Value data, Value createdAt, }); class $$LocalMessageEventTableTableFilterComposer extends Composer<_$AppDatabase, $LocalMessageEventTableTable> { $$LocalMessageEventTableTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column)); ColumnFilters get channelId => $composableBuilder( column: $table.channelId, builder: (column) => ColumnFilters(column)); ColumnWithTypeConverterFilters get data => $composableBuilder( column: $table.data, builder: (column) => ColumnWithTypeConverterFilters(column)); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column)); } class $$LocalMessageEventTableTableOrderingComposer extends Composer<_$AppDatabase, $LocalMessageEventTableTable> { $$LocalMessageEventTableTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column)); ColumnOrderings get channelId => $composableBuilder( column: $table.channelId, builder: (column) => ColumnOrderings(column)); ColumnOrderings get data => $composableBuilder( column: $table.data, builder: (column) => ColumnOrderings(column)); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column)); } class $$LocalMessageEventTableTableAnnotationComposer extends Composer<_$AppDatabase, $LocalMessageEventTableTable> { $$LocalMessageEventTableTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get channelId => $composableBuilder(column: $table.channelId, builder: (column) => column); GeneratedColumnWithTypeConverter get data => $composableBuilder(column: $table.data, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); } class $$LocalMessageEventTableTableTableManager extends RootTableManager< _$AppDatabase, $LocalMessageEventTableTable, LocalMessageEventTableData, $$LocalMessageEventTableTableFilterComposer, $$LocalMessageEventTableTableOrderingComposer, $$LocalMessageEventTableTableAnnotationComposer, $$LocalMessageEventTableTableCreateCompanionBuilder, $$LocalMessageEventTableTableUpdateCompanionBuilder, ( LocalMessageEventTableData, BaseReferences<_$AppDatabase, $LocalMessageEventTableTable, LocalMessageEventTableData> ), LocalMessageEventTableData, PrefetchHooks Function()> { $$LocalMessageEventTableTableTableManager( _$AppDatabase db, $LocalMessageEventTableTable table) : super(TableManagerState( db: db, table: table, createFilteringComposer: () => $$LocalMessageEventTableTableFilterComposer( $db: db, $table: table), createOrderingComposer: () => $$LocalMessageEventTableTableOrderingComposer( $db: db, $table: table), createComputedFieldComposer: () => $$LocalMessageEventTableTableAnnotationComposer( $db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value channelId = const Value.absent(), Value data = const Value.absent(), Value createdAt = const Value.absent(), }) => LocalMessageEventTableCompanion( id: id, channelId: channelId, data: data, createdAt: createdAt, ), createCompanionCallback: ({ Value id = const Value.absent(), required int channelId, required Event? data, Value createdAt = const Value.absent(), }) => LocalMessageEventTableCompanion.insert( id: id, channelId: channelId, data: data, createdAt: createdAt, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, )); } typedef $$LocalMessageEventTableTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $LocalMessageEventTableTable, LocalMessageEventTableData, $$LocalMessageEventTableTableFilterComposer, $$LocalMessageEventTableTableOrderingComposer, $$LocalMessageEventTableTableAnnotationComposer, $$LocalMessageEventTableTableCreateCompanionBuilder, $$LocalMessageEventTableTableUpdateCompanionBuilder, ( LocalMessageEventTableData, BaseReferences<_$AppDatabase, $LocalMessageEventTableTable, LocalMessageEventTableData> ), LocalMessageEventTableData, PrefetchHooks Function()>; class $AppDatabaseManager { final _$AppDatabase _db; $AppDatabaseManager(this._db); $$LocalMessageEventTableTableTableManager get localMessageEventTable => $$LocalMessageEventTableTableTableManager( _db, _db.localMessageEventTable); }