// ************************************************************************** // MoorGenerator // ************************************************************************** // ignore_for_file: unnecessary_brace_in_string_interps, unnecessary_this class Config extends DataClass implements Insertable { final String configKey; final String? configValue; final SyncType? syncState; final SyncType? syncStateImplicit; Config( {required this.configKey, this.configValue, this.syncState, this.syncStateImplicit}); factory Config.fromData(Map data, GeneratedDatabase db, {String? prefix}) { final effectivePrefix = prefix ?? ''; final stringType = db.typeSystem.forDartType(); final intType = db.typeSystem.forDartType(); return Config( configKey: stringType .mapFromDatabaseResponse(data['${effectivePrefix}config_key'])!, configValue: stringType .mapFromDatabaseResponse(data['${effectivePrefix}config_value']), syncState: ConfigTable.$converter0.mapToDart(intType .mapFromDatabaseResponse(data['${effectivePrefix}sync_state'])), syncStateImplicit: ConfigTable.$converter1.mapToDart( intType.mapFromDatabaseResponse( data['${effectivePrefix}sync_state_implicit'])), ); } @override Map toColumns(bool nullToAbsent) { final map = {}; map['config_key'] = Variable(configKey); if (!nullToAbsent || configValue != null) { map['config_value'] = Variable(configValue); } if (!nullToAbsent || syncState != null) { final converter = ConfigTable.$converter0; map['sync_state'] = Variable(converter.mapToSql(syncState)); } if (!nullToAbsent || syncStateImplicit != null) { final converter = ConfigTable.$converter1; map['sync_state_implicit'] = Variable(converter.mapToSql(syncStateImplicit)); } return map; } ConfigCompanion toCompanion(bool nullToAbsent) { return ConfigCompanion( configKey: Value(configKey), configValue: configValue == null && nullToAbsent ? const Value.absent() : Value(configValue), syncState: syncState == null && nullToAbsent ? const Value.absent() : Value(syncState), syncStateImplicit: syncStateImplicit == null && nullToAbsent ? const Value.absent() : Value(syncStateImplicit), ); } factory Config.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return Config( configKey: serializer.fromJson(json['config_key']), configValue: serializer.fromJson(json['config_value']), syncState: serializer.fromJson(json['sync_state']), syncStateImplicit: serializer.fromJson(json['sync_state_implicit']), ); } factory Config.fromJsonString(String encodedJson, {ValueSerializer? serializer}) => Config.fromJson(DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'config_key': serializer.toJson(configKey), 'config_value': serializer.toJson(configValue), 'sync_state': serializer.toJson(syncState), 'sync_state_implicit': serializer.toJson(syncStateImplicit), }; } Config copyWith( {String? configKey, Value configValue = const Value.absent(), Value syncState = const Value.absent(), Value syncStateImplicit = const Value.absent()}) => Config( configKey: configKey ?? this.configKey, configValue: configValue.present ? configValue.value : this.configValue, syncState: syncState.present ? syncState.value : this.syncState, syncStateImplicit: syncStateImplicit.present ? syncStateImplicit.value : this.syncStateImplicit, ); @override String toString() { return (StringBuffer('Config(') ..write('configKey: $configKey, ') ..write('configValue: $configValue, ') ..write('syncState: $syncState, ') ..write('syncStateImplicit: $syncStateImplicit') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc( configKey.hashCode, $mrjc(configValue.hashCode, $mrjc(syncState.hashCode, syncStateImplicit.hashCode)))); @override bool operator ==(dynamic other) => identical(this, other) || (other is Config && other.configKey == this.configKey && other.configValue == this.configValue && other.syncState == this.syncState && other.syncStateImplicit == this.syncStateImplicit); } class ConfigCompanion extends UpdateCompanion { final Value configKey; final Value configValue; final Value syncState; final Value syncStateImplicit; const ConfigCompanion({ this.configKey = const Value.absent(), this.configValue = const Value.absent(), this.syncState = const Value.absent(), this.syncStateImplicit = const Value.absent(), }); ConfigCompanion.insert({ required String configKey, this.configValue = const Value.absent(), this.syncState = const Value.absent(), this.syncStateImplicit = const Value.absent(), }) : configKey = Value(configKey); static Insertable custom({ Expression? configKey, Expression? configValue, Expression? syncState, Expression? syncStateImplicit, }) { return RawValuesInsertable({ if (configKey != null) 'config_key': configKey, if (configValue != null) 'config_value': configValue, if (syncState != null) 'sync_state': syncState, if (syncStateImplicit != null) 'sync_state_implicit': syncStateImplicit, }); } ConfigCompanion copyWith( {Value? configKey, Value? configValue, Value? syncState, Value? syncStateImplicit}) { return ConfigCompanion( configKey: configKey ?? this.configKey, configValue: configValue ?? this.configValue, syncState: syncState ?? this.syncState, syncStateImplicit: syncStateImplicit ?? this.syncStateImplicit, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (configKey.present) { map['config_key'] = Variable(configKey.value); } if (configValue.present) { map['config_value'] = Variable(configValue.value); } if (syncState.present) { final converter = ConfigTable.$converter0; map['sync_state'] = Variable(converter.mapToSql(syncState.value)); } if (syncStateImplicit.present) { final converter = ConfigTable.$converter1; map['sync_state_implicit'] = Variable(converter.mapToSql(syncStateImplicit.value)); } return map; } @override String toString() { return (StringBuffer('ConfigCompanion(') ..write('configKey: $configKey, ') ..write('configValue: $configValue, ') ..write('syncState: $syncState, ') ..write('syncStateImplicit: $syncStateImplicit') ..write(')')) .toString(); } } class ConfigTable extends Table with TableInfo { final GeneratedDatabase _db; final String? _alias; ConfigTable(this._db, [this._alias]); final VerificationMeta _configKeyMeta = const VerificationMeta('configKey'); late final GeneratedTextColumn configKey = _constructConfigKey(); GeneratedTextColumn _constructConfigKey() { return GeneratedTextColumn('config_key', $tableName, false, $customConstraints: 'not null primary key'); } final VerificationMeta _configValueMeta = const VerificationMeta('configValue'); late final GeneratedTextColumn configValue = _constructConfigValue(); GeneratedTextColumn _constructConfigValue() { return GeneratedTextColumn('config_value', $tableName, true, $customConstraints: ''); } final VerificationMeta _syncStateMeta = const VerificationMeta('syncState'); late final GeneratedIntColumn syncState = _constructSyncState(); GeneratedIntColumn _constructSyncState() { return GeneratedIntColumn('sync_state', $tableName, true, $customConstraints: ''); } final VerificationMeta _syncStateImplicitMeta = const VerificationMeta('syncStateImplicit'); late final GeneratedIntColumn syncStateImplicit = _constructSyncStateImplicit(); GeneratedIntColumn _constructSyncStateImplicit() { return GeneratedIntColumn('sync_state_implicit', $tableName, true, $customConstraints: ''); } @override List get $columns => [configKey, configValue, syncState, syncStateImplicit]; @override ConfigTable get asDslTable => this; @override String get $tableName => _alias ?? 'config'; @override final String actualTableName = 'config'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('config_key')) { context.handle(_configKeyMeta, configKey.isAcceptableOrUnknown(data['config_key']!, _configKeyMeta)); } else if (isInserting) { context.missing(_configKeyMeta); } if (data.containsKey('config_value')) { context.handle( _configValueMeta, configValue.isAcceptableOrUnknown( data['config_value']!, _configValueMeta)); } context.handle(_syncStateMeta, const VerificationResult.success()); context.handle(_syncStateImplicitMeta, const VerificationResult.success()); return context; } @override Set get $primaryKey => {configKey}; @override Config map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return Config.fromData(data, _db, prefix: effectivePrefix); } @override ConfigTable createAlias(String alias) { return ConfigTable(_db, alias); } static TypeConverter $converter0 = const SyncTypeConverter(); static TypeConverter $converter1 = const EnumIndexConverter(SyncType.values); @override bool get dontWriteConstraints => true; } class WithDefault extends DataClass implements Insertable { final String? a; final int? b; WithDefault({this.a, this.b}); factory WithDefault.fromData(Map data, GeneratedDatabase db, {String? prefix}) { final effectivePrefix = prefix ?? ''; final stringType = db.typeSystem.forDartType(); final intType = db.typeSystem.forDartType(); return WithDefault( a: stringType.mapFromDatabaseResponse(data['${effectivePrefix}a']), b: intType.mapFromDatabaseResponse(data['${effectivePrefix}b']), ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (!nullToAbsent || a != null) { map['a'] = Variable(a); } if (!nullToAbsent || b != null) { map['b'] = Variable(b); } return map; } WithDefaultsCompanion toCompanion(bool nullToAbsent) { return WithDefaultsCompanion( a: a == null && nullToAbsent ? const Value.absent() : Value(a), b: b == null && nullToAbsent ? const Value.absent() : Value(b), ); } factory WithDefault.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return WithDefault( a: serializer.fromJson(json['a']), b: serializer.fromJson(json['b']), ); } factory WithDefault.fromJsonString(String encodedJson, {ValueSerializer? serializer}) => WithDefault.fromJson( DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'a': serializer.toJson(a), 'b': serializer.toJson(b), }; } WithDefault copyWith( {Value a = const Value.absent(), Value b = const Value.absent()}) => WithDefault( a: a.present ? a.value : this.a, b: b.present ? b.value : this.b, ); @override String toString() { return (StringBuffer('WithDefault(') ..write('a: $a, ') ..write('b: $b') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc(a.hashCode, b.hashCode)); @override bool operator ==(dynamic other) => identical(this, other) || (other is WithDefault && other.a == this.a && other.b == this.b); } class WithDefaultsCompanion extends UpdateCompanion { final Value a; final Value b; const WithDefaultsCompanion({ this.a = const Value.absent(), this.b = const Value.absent(), }); WithDefaultsCompanion.insert({ this.a = const Value.absent(), this.b = const Value.absent(), }); static Insertable custom({ Expression? a, Expression? b, }) { return RawValuesInsertable({ if (a != null) 'a': a, if (b != null) 'b': b, }); } WithDefaultsCompanion copyWith({Value? a, Value? b}) { return WithDefaultsCompanion( a: a ?? this.a, b: b ?? this.b, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (a.present) { map['a'] = Variable(a.value); } if (b.present) { map['b'] = Variable(b.value); } return map; } @override String toString() { return (StringBuffer('WithDefaultsCompanion(') ..write('a: $a, ') ..write('b: $b') ..write(')')) .toString(); } } class WithDefaults extends Table with TableInfo { final GeneratedDatabase _db; final String? _alias; WithDefaults(this._db, [this._alias]); final VerificationMeta _aMeta = const VerificationMeta('a'); late final GeneratedTextColumn a = _constructA(); GeneratedTextColumn _constructA() { return GeneratedTextColumn('a', $tableName, true, $customConstraints: 'DEFAULT \'something\'', defaultValue: const CustomExpression('\'something\'')); } final VerificationMeta _bMeta = const VerificationMeta('b'); late final GeneratedIntColumn b = _constructB(); GeneratedIntColumn _constructB() { return GeneratedIntColumn('b', $tableName, true, $customConstraints: 'UNIQUE'); } @override List get $columns => [a, b]; @override WithDefaults get asDslTable => this; @override String get $tableName => _alias ?? 'with_defaults'; @override final String actualTableName = 'with_defaults'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('a')) { context.handle(_aMeta, a.isAcceptableOrUnknown(data['a']!, _aMeta)); } if (data.containsKey('b')) { context.handle(_bMeta, b.isAcceptableOrUnknown(data['b']!, _bMeta)); } return context; } @override Set get $primaryKey => {}; @override WithDefault map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return WithDefault.fromData(data, _db, prefix: effectivePrefix); } @override WithDefaults createAlias(String alias) { return WithDefaults(_db, alias); } @override bool get dontWriteConstraints => true; } class NoId extends DataClass implements Insertable { final Uint8List payload; NoId({required this.payload}); factory NoId.fromData(Map data, GeneratedDatabase db, {String? prefix}) { final effectivePrefix = prefix ?? ''; final uint8ListType = db.typeSystem.forDartType(); return NoId( payload: uint8ListType .mapFromDatabaseResponse(data['${effectivePrefix}payload'])!, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; map['payload'] = Variable(payload); return map; } NoIdsCompanion toCompanion(bool nullToAbsent) { return NoIdsCompanion( payload: Value(payload), ); } factory NoId.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return NoId( payload: serializer.fromJson(json['payload']), ); } factory NoId.fromJsonString(String encodedJson, {ValueSerializer? serializer}) => NoId.fromJson(DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'payload': serializer.toJson(payload), }; } NoId copyWith({Uint8List? payload}) => NoId( payload: payload ?? this.payload, ); @override String toString() { return (StringBuffer('NoId(')..write('payload: $payload')..write(')')) .toString(); } @override int get hashCode => $mrjf(payload.hashCode); @override bool operator ==(dynamic other) => identical(this, other) || (other is NoId && other.payload == this.payload); } class NoIdsCompanion extends UpdateCompanion { final Value payload; const NoIdsCompanion({ this.payload = const Value.absent(), }); NoIdsCompanion.insert({ required Uint8List payload, }) : payload = Value(payload); static Insertable custom({ Expression? payload, }) { return RawValuesInsertable({ if (payload != null) 'payload': payload, }); } NoIdsCompanion copyWith({Value? payload}) { return NoIdsCompanion( payload: payload ?? this.payload, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (payload.present) { map['payload'] = Variable(payload.value); } return map; } @override String toString() { return (StringBuffer('NoIdsCompanion(') ..write('payload: $payload') ..write(')')) .toString(); } } class NoIds extends Table with TableInfo { final GeneratedDatabase _db; final String? _alias; NoIds(this._db, [this._alias]); final VerificationMeta _payloadMeta = const VerificationMeta('payload'); late final GeneratedBlobColumn payload = _constructPayload(); GeneratedBlobColumn _constructPayload() { return GeneratedBlobColumn('payload', $tableName, false, $customConstraints: 'NOT NULL PRIMARY KEY'); } @override List get $columns => [payload]; @override NoIds get asDslTable => this; @override String get $tableName => _alias ?? 'no_ids'; @override final String actualTableName = 'no_ids'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('payload')) { context.handle(_payloadMeta, payload.isAcceptableOrUnknown(data['payload']!, _payloadMeta)); } else if (isInserting) { context.missing(_payloadMeta); } return context; } @override Set get $primaryKey => {payload}; @override NoId map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return NoId.fromData(data, _db, prefix: effectivePrefix); } @override NoIds createAlias(String alias) { return NoIds(_db, alias); } @override bool get withoutRowId => true; @override bool get dontWriteConstraints => true; } class WithConstraint extends DataClass implements Insertable { final String? a; final int b; final double? c; WithConstraint({this.a, required this.b, this.c}); factory WithConstraint.fromData( Map data, GeneratedDatabase db, {String? prefix}) { final effectivePrefix = prefix ?? ''; final stringType = db.typeSystem.forDartType(); final intType = db.typeSystem.forDartType(); final doubleType = db.typeSystem.forDartType(); return WithConstraint( a: stringType.mapFromDatabaseResponse(data['${effectivePrefix}a']), b: intType.mapFromDatabaseResponse(data['${effectivePrefix}b'])!, c: doubleType.mapFromDatabaseResponse(data['${effectivePrefix}c']), ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (!nullToAbsent || a != null) { map['a'] = Variable(a); } map['b'] = Variable(b); if (!nullToAbsent || c != null) { map['c'] = Variable(c); } return map; } WithConstraintsCompanion toCompanion(bool nullToAbsent) { return WithConstraintsCompanion( a: a == null && nullToAbsent ? const Value.absent() : Value(a), b: Value(b), c: c == null && nullToAbsent ? const Value.absent() : Value(c), ); } factory WithConstraint.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return WithConstraint( a: serializer.fromJson(json['a']), b: serializer.fromJson(json['b']), c: serializer.fromJson(json['c']), ); } factory WithConstraint.fromJsonString(String encodedJson, {ValueSerializer? serializer}) => WithConstraint.fromJson( DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'a': serializer.toJson(a), 'b': serializer.toJson(b), 'c': serializer.toJson(c), }; } WithConstraint copyWith( {Value a = const Value.absent(), int? b, Value c = const Value.absent()}) => WithConstraint( a: a.present ? a.value : this.a, b: b ?? this.b, c: c.present ? c.value : this.c, ); @override String toString() { return (StringBuffer('WithConstraint(') ..write('a: $a, ') ..write('b: $b, ') ..write('c: $c') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc(a.hashCode, $mrjc(b.hashCode, c.hashCode))); @override bool operator ==(dynamic other) => identical(this, other) || (other is WithConstraint && other.a == this.a && other.b == this.b && other.c == this.c); } class WithConstraintsCompanion extends UpdateCompanion { final Value a; final Value b; final Value c; const WithConstraintsCompanion({ this.a = const Value.absent(), this.b = const Value.absent(), this.c = const Value.absent(), }); WithConstraintsCompanion.insert({ this.a = const Value.absent(), required int b, this.c = const Value.absent(), }) : b = Value(b); static Insertable custom({ Expression? a, Expression? b, Expression? c, }) { return RawValuesInsertable({ if (a != null) 'a': a, if (b != null) 'b': b, if (c != null) 'c': c, }); } WithConstraintsCompanion copyWith( {Value? a, Value? b, Value? c}) { return WithConstraintsCompanion( a: a ?? this.a, b: b ?? this.b, c: c ?? this.c, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (a.present) { map['a'] = Variable(a.value); } if (b.present) { map['b'] = Variable(b.value); } if (c.present) { map['c'] = Variable(c.value); } return map; } @override String toString() { return (StringBuffer('WithConstraintsCompanion(') ..write('a: $a, ') ..write('b: $b, ') ..write('c: $c') ..write(')')) .toString(); } } class WithConstraints extends Table with TableInfo { final GeneratedDatabase _db; final String? _alias; WithConstraints(this._db, [this._alias]); final VerificationMeta _aMeta = const VerificationMeta('a'); late final GeneratedTextColumn a = _constructA(); GeneratedTextColumn _constructA() { return GeneratedTextColumn('a', $tableName, true, $customConstraints: ''); } final VerificationMeta _bMeta = const VerificationMeta('b'); late final GeneratedIntColumn b = _constructB(); GeneratedIntColumn _constructB() { return GeneratedIntColumn('b', $tableName, false, $customConstraints: 'NOT NULL'); } final VerificationMeta _cMeta = const VerificationMeta('c'); late final GeneratedRealColumn c = _constructC(); GeneratedRealColumn _constructC() { return GeneratedRealColumn('c', $tableName, true, $customConstraints: ''); } @override List get $columns => [a, b, c]; @override WithConstraints get asDslTable => this; @override String get $tableName => _alias ?? 'with_constraints'; @override final String actualTableName = 'with_constraints'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('a')) { context.handle(_aMeta, a.isAcceptableOrUnknown(data['a']!, _aMeta)); } if (data.containsKey('b')) { context.handle(_bMeta, b.isAcceptableOrUnknown(data['b']!, _bMeta)); } else if (isInserting) { context.missing(_bMeta); } if (data.containsKey('c')) { context.handle(_cMeta, c.isAcceptableOrUnknown(data['c']!, _cMeta)); } return context; } @override Set get $primaryKey => {}; @override WithConstraint map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return WithConstraint.fromData(data, _db, prefix: effectivePrefix); } @override WithConstraints createAlias(String alias) { return WithConstraints(_db, alias); } @override List get customConstraints => const ['FOREIGN KEY (a, b) REFERENCES with_defaults (a, b)']; @override bool get dontWriteConstraints => true; } class MytableData extends DataClass implements Insertable { final int someid; final String? sometext; final bool? isInserting; final DateTime? somedate; MytableData( {required this.someid, this.sometext, this.isInserting, this.somedate}); factory MytableData.fromData(Map data, GeneratedDatabase db, {String? prefix}) { final effectivePrefix = prefix ?? ''; final intType = db.typeSystem.forDartType(); final stringType = db.typeSystem.forDartType(); final boolType = db.typeSystem.forDartType(); final dateTimeType = db.typeSystem.forDartType(); return MytableData( someid: intType.mapFromDatabaseResponse(data['${effectivePrefix}someid'])!, sometext: stringType .mapFromDatabaseResponse(data['${effectivePrefix}sometext']), isInserting: boolType .mapFromDatabaseResponse(data['${effectivePrefix}is_inserting']), somedate: dateTimeType .mapFromDatabaseResponse(data['${effectivePrefix}somedate']), ); } @override Map toColumns(bool nullToAbsent) { final map = {}; map['someid'] = Variable(someid); if (!nullToAbsent || sometext != null) { map['sometext'] = Variable(sometext); } if (!nullToAbsent || isInserting != null) { map['is_inserting'] = Variable(isInserting); } if (!nullToAbsent || somedate != null) { map['somedate'] = Variable(somedate); } return map; } MytableCompanion toCompanion(bool nullToAbsent) { return MytableCompanion( someid: Value(someid), sometext: sometext == null && nullToAbsent ? const Value.absent() : Value(sometext), isInserting: isInserting == null && nullToAbsent ? const Value.absent() : Value(isInserting), somedate: somedate == null && nullToAbsent ? const Value.absent() : Value(somedate), ); } factory MytableData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return MytableData( someid: serializer.fromJson(json['someid']), sometext: serializer.fromJson(json['sometext']), isInserting: serializer.fromJson(json['is_inserting']), somedate: serializer.fromJson(json['somedate']), ); } factory MytableData.fromJsonString(String encodedJson, {ValueSerializer? serializer}) => MytableData.fromJson( DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'someid': serializer.toJson(someid), 'sometext': serializer.toJson(sometext), 'is_inserting': serializer.toJson(isInserting), 'somedate': serializer.toJson(somedate), }; } MytableData copyWith( {int? someid, Value sometext = const Value.absent(), Value isInserting = const Value.absent(), Value somedate = const Value.absent()}) => MytableData( someid: someid ?? this.someid, sometext: sometext.present ? sometext.value : this.sometext, isInserting: isInserting.present ? isInserting.value : this.isInserting, somedate: somedate.present ? somedate.value : this.somedate, ); @override String toString() { return (StringBuffer('MytableData(') ..write('someid: $someid, ') ..write('sometext: $sometext, ') ..write('isInserting: $isInserting, ') ..write('somedate: $somedate') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc( someid.hashCode, $mrjc( sometext.hashCode, $mrjc(isInserting.hashCode, somedate.hashCode)))); @override bool operator ==(dynamic other) => identical(this, other) || (other is MytableData && other.someid == this.someid && other.sometext == this.sometext && other.isInserting == this.isInserting && other.somedate == this.somedate); } class MytableCompanion extends UpdateCompanion { final Value someid; final Value sometext; final Value isInserting; final Value somedate; const MytableCompanion({ this.someid = const Value.absent(), this.sometext = const Value.absent(), this.isInserting = const Value.absent(), this.somedate = const Value.absent(), }); MytableCompanion.insert({ this.someid = const Value.absent(), this.sometext = const Value.absent(), this.isInserting = const Value.absent(), this.somedate = const Value.absent(), }); static Insertable custom({ Expression? someid, Expression? sometext, Expression? isInserting, Expression? somedate, }) { return RawValuesInsertable({ if (someid != null) 'someid': someid, if (sometext != null) 'sometext': sometext, if (isInserting != null) 'is_inserting': isInserting, if (somedate != null) 'somedate': somedate, }); } MytableCompanion copyWith( {Value? someid, Value? sometext, Value? isInserting, Value? somedate}) { return MytableCompanion( someid: someid ?? this.someid, sometext: sometext ?? this.sometext, isInserting: isInserting ?? this.isInserting, somedate: somedate ?? this.somedate, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (someid.present) { map['someid'] = Variable(someid.value); } if (sometext.present) { map['sometext'] = Variable(sometext.value); } if (isInserting.present) { map['is_inserting'] = Variable(isInserting.value); } if (somedate.present) { map['somedate'] = Variable(somedate.value); } return map; } @override String toString() { return (StringBuffer('MytableCompanion(') ..write('someid: $someid, ') ..write('sometext: $sometext, ') ..write('isInserting: $isInserting, ') ..write('somedate: $somedate') ..write(')')) .toString(); } } class Mytable extends Table with TableInfo { final GeneratedDatabase _db; final String? _alias; Mytable(this._db, [this._alias]); final VerificationMeta _someidMeta = const VerificationMeta('someid'); late final GeneratedIntColumn someid = _constructSomeid(); GeneratedIntColumn _constructSomeid() { return GeneratedIntColumn('someid', $tableName, false, $customConstraints: 'NOT NULL'); } final VerificationMeta _sometextMeta = const VerificationMeta('sometext'); late final GeneratedTextColumn sometext = _constructSometext(); GeneratedTextColumn _constructSometext() { return GeneratedTextColumn('sometext', $tableName, true, $customConstraints: ''); } final VerificationMeta _isInsertingMeta = const VerificationMeta('isInserting'); late final GeneratedBoolColumn isInserting = _constructIsInserting(); GeneratedBoolColumn _constructIsInserting() { return GeneratedBoolColumn('is_inserting', $tableName, true, $customConstraints: ''); } final VerificationMeta _somedateMeta = const VerificationMeta('somedate'); late final GeneratedDateTimeColumn somedate = _constructSomedate(); GeneratedDateTimeColumn _constructSomedate() { return GeneratedDateTimeColumn('somedate', $tableName, true, $customConstraints: ''); } @override List get $columns => [someid, sometext, isInserting, somedate]; @override Mytable get asDslTable => this; @override String get $tableName => _alias ?? 'mytable'; @override final String actualTableName = 'mytable'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('someid')) { context.handle(_someidMeta, someid.isAcceptableOrUnknown(data['someid']!, _someidMeta)); } if (data.containsKey('sometext')) { context.handle(_sometextMeta, sometext.isAcceptableOrUnknown(data['sometext']!, _sometextMeta)); } if (data.containsKey('is_inserting')) { context.handle( _isInsertingMeta, this .isInserting .isAcceptableOrUnknown(data['is_inserting']!, _isInsertingMeta)); } if (data.containsKey('somedate')) { context.handle(_somedateMeta, somedate.isAcceptableOrUnknown(data['somedate']!, _somedateMeta)); } return context; } @override Set get $primaryKey => {someid}; @override MytableData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return MytableData.fromData(data, _db, prefix: effectivePrefix); } @override Mytable createAlias(String alias) { return Mytable(_db, alias); } @override List get customConstraints => const ['PRIMARY KEY (someid DESC)']; @override bool get dontWriteConstraints => true; } class EMail extends DataClass implements Insertable { final String sender; final String title; final String body; EMail({required this.sender, required this.title, required this.body}); factory EMail.fromData(Map data, GeneratedDatabase db, {String? prefix}) { final effectivePrefix = prefix ?? ''; final stringType = db.typeSystem.forDartType(); return EMail( sender: stringType.mapFromDatabaseResponse(data['${effectivePrefix}sender'])!, title: stringType.mapFromDatabaseResponse(data['${effectivePrefix}title'])!, body: stringType.mapFromDatabaseResponse(data['${effectivePrefix}body'])!, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; map['sender'] = Variable(sender); map['title'] = Variable(title); map['body'] = Variable(body); return map; } EmailCompanion toCompanion(bool nullToAbsent) { return EmailCompanion( sender: Value(sender), title: Value(title), body: Value(body), ); } factory EMail.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return EMail( sender: serializer.fromJson(json['sender']), title: serializer.fromJson(json['title']), body: serializer.fromJson(json['body']), ); } factory EMail.fromJsonString(String encodedJson, {ValueSerializer? serializer}) => EMail.fromJson(DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'sender': serializer.toJson(sender), 'title': serializer.toJson(title), 'body': serializer.toJson(body), }; } EMail copyWith({String? sender, String? title, String? body}) => EMail( sender: sender ?? this.sender, title: title ?? this.title, body: body ?? this.body, ); @override String toString() { return (StringBuffer('EMail(') ..write('sender: $sender, ') ..write('title: $title, ') ..write('body: $body') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc(sender.hashCode, $mrjc(title.hashCode, body.hashCode))); @override bool operator ==(dynamic other) => identical(this, other) || (other is EMail && other.sender == this.sender && other.title == this.title && other.body == this.body); } class EmailCompanion extends UpdateCompanion { final Value sender; final Value title; final Value body; const EmailCompanion({ this.sender = const Value.absent(), this.title = const Value.absent(), this.body = const Value.absent(), }); EmailCompanion.insert({ required String sender, required String title, required String body, }) : sender = Value(sender), title = Value(title), body = Value(body); static Insertable custom({ Expression? sender, Expression? title, Expression? body, }) { return RawValuesInsertable({ if (sender != null) 'sender': sender, if (title != null) 'title': title, if (body != null) 'body': body, }); } EmailCompanion copyWith( {Value? sender, Value? title, Value? body}) { return EmailCompanion( sender: sender ?? this.sender, title: title ?? this.title, body: body ?? this.body, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (sender.present) { map['sender'] = Variable(sender.value); } if (title.present) { map['title'] = Variable(title.value); } if (body.present) { map['body'] = Variable(body.value); } return map; } @override String toString() { return (StringBuffer('EmailCompanion(') ..write('sender: $sender, ') ..write('title: $title, ') ..write('body: $body') ..write(')')) .toString(); } } class Email extends Table with TableInfo, VirtualTableInfo { final GeneratedDatabase _db; final String? _alias; Email(this._db, [this._alias]); final VerificationMeta _senderMeta = const VerificationMeta('sender'); late final GeneratedTextColumn sender = _constructSender(); GeneratedTextColumn _constructSender() { return GeneratedTextColumn('sender', $tableName, false, $customConstraints: ''); } final VerificationMeta _titleMeta = const VerificationMeta('title'); late final GeneratedTextColumn title = _constructTitle(); GeneratedTextColumn _constructTitle() { return GeneratedTextColumn('title', $tableName, false, $customConstraints: ''); } final VerificationMeta _bodyMeta = const VerificationMeta('body'); late final GeneratedTextColumn body = _constructBody(); GeneratedTextColumn _constructBody() { return GeneratedTextColumn('body', $tableName, false, $customConstraints: ''); } @override List get $columns => [sender, title, body]; @override Email get asDslTable => this; @override String get $tableName => _alias ?? 'email'; @override final String actualTableName = 'email'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('sender')) { context.handle(_senderMeta, sender.isAcceptableOrUnknown(data['sender']!, _senderMeta)); } else if (isInserting) { context.missing(_senderMeta); } if (data.containsKey('title')) { context.handle( _titleMeta, title.isAcceptableOrUnknown(data['title']!, _titleMeta)); } else if (isInserting) { context.missing(_titleMeta); } if (data.containsKey('body')) { context.handle( _bodyMeta, body.isAcceptableOrUnknown(data['body']!, _bodyMeta)); } else if (isInserting) { context.missing(_bodyMeta); } return context; } @override Set get $primaryKey => {}; @override EMail map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return EMail.fromData(data, _db, prefix: effectivePrefix); } @override Email createAlias(String alias) { return Email(_db, alias); } @override bool get dontWriteConstraints => true; @override String get moduleAndArgs => 'fts5(sender, title, body)'; } class WeirdData extends DataClass implements Insertable { final int sqlClass; final String textColumn; WeirdData({required this.sqlClass, required this.textColumn}); factory WeirdData.fromData(Map data, GeneratedDatabase db, {String? prefix}) { final effectivePrefix = prefix ?? ''; final intType = db.typeSystem.forDartType(); final stringType = db.typeSystem.forDartType(); return WeirdData( sqlClass: intType.mapFromDatabaseResponse(data['${effectivePrefix}class'])!, textColumn: stringType.mapFromDatabaseResponse(data['${effectivePrefix}text'])!, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; map['class'] = Variable(sqlClass); map['text'] = Variable(textColumn); return map; } WeirdTableCompanion toCompanion(bool nullToAbsent) { return WeirdTableCompanion( sqlClass: Value(sqlClass), textColumn: Value(textColumn), ); } factory WeirdData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return WeirdData( sqlClass: serializer.fromJson(json['class']), textColumn: serializer.fromJson(json['text']), ); } factory WeirdData.fromJsonString(String encodedJson, {ValueSerializer? serializer}) => WeirdData.fromJson( DataClass.parseJson(encodedJson) as Map, serializer: serializer); @override Map toJson({ValueSerializer? serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'class': serializer.toJson(sqlClass), 'text': serializer.toJson(textColumn), }; } WeirdData copyWith({int? sqlClass, String? textColumn}) => WeirdData( sqlClass: sqlClass ?? this.sqlClass, textColumn: textColumn ?? this.textColumn, ); @override String toString() { return (StringBuffer('WeirdData(') ..write('sqlClass: $sqlClass, ') ..write('textColumn: $textColumn') ..write(')')) .toString(); } @override int get hashCode => $mrjf($mrjc(sqlClass.hashCode, textColumn.hashCode)); @override bool operator ==(dynamic other) => identical(this, other) || (other is WeirdData && other.sqlClass == this.sqlClass && other.textColumn == this.textColumn); } class WeirdTableCompanion extends UpdateCompanion { final Value sqlClass; final Value textColumn; const WeirdTableCompanion({ this.sqlClass = const Value.absent(), this.textColumn = const Value.absent(), }); WeirdTableCompanion.insert({ required int sqlClass, required String textColumn, }) : sqlClass = Value(sqlClass), textColumn = Value(textColumn); static Insertable custom({ Expression? sqlClass, Expression? textColumn, }) { return RawValuesInsertable({ if (sqlClass != null) 'class': sqlClass, if (textColumn != null) 'text': textColumn, }); } WeirdTableCompanion copyWith( {Value? sqlClass, Value? textColumn}) { return WeirdTableCompanion( sqlClass: sqlClass ?? this.sqlClass, textColumn: textColumn ?? this.textColumn, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (sqlClass.present) { map['class'] = Variable(sqlClass.value); } if (textColumn.present) { map['text'] = Variable(textColumn.value); } return map; } @override String toString() { return (StringBuffer('WeirdTableCompanion(') ..write('sqlClass: $sqlClass, ') ..write('textColumn: $textColumn') ..write(')')) .toString(); } } class WeirdTable extends Table with TableInfo { final GeneratedDatabase _db; final String? _alias; WeirdTable(this._db, [this._alias]); final VerificationMeta _sqlClassMeta = const VerificationMeta('sqlClass'); late final GeneratedIntColumn sqlClass = _constructSqlClass(); GeneratedIntColumn _constructSqlClass() { return GeneratedIntColumn('class', $tableName, false, $customConstraints: 'NOT NULL'); } final VerificationMeta _textColumnMeta = const VerificationMeta('textColumn'); late final GeneratedTextColumn textColumn = _constructTextColumn(); GeneratedTextColumn _constructTextColumn() { return GeneratedTextColumn('text', $tableName, false, $customConstraints: 'NOT NULL'); } @override List get $columns => [sqlClass, textColumn]; @override WeirdTable get asDslTable => this; @override String get $tableName => _alias ?? 'Expression'; @override final String actualTableName = 'Expression'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('class')) { context.handle(_sqlClassMeta, sqlClass.isAcceptableOrUnknown(data['class']!, _sqlClassMeta)); } else if (isInserting) { context.missing(_sqlClassMeta); } if (data.containsKey('text')) { context.handle(_textColumnMeta, textColumn.isAcceptableOrUnknown(data['text']!, _textColumnMeta)); } else if (isInserting) { context.missing(_textColumnMeta); } return context; } @override Set get $primaryKey => {}; @override WeirdData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return WeirdData.fromData(data, _db, prefix: effectivePrefix); } @override WeirdTable createAlias(String alias) { return WeirdTable(_db, alias); } @override bool get dontWriteConstraints => true; } abstract class _$CustomTablesDb extends GeneratedDatabase { _$CustomTablesDb(QueryExecutor e) : super(SqlTypeSystem.defaultInstance, e); _$CustomTablesDb.connect(DatabaseConnection c) : super.connect(c); late final ConfigTable config = ConfigTable(this); late final Index valueIdx = Index('value_idx', 'CREATE INDEX IF NOT EXISTS value_idx ON config (config_value)'); late final WithDefaults withDefaults = WithDefaults(this); late final Trigger myTrigger = Trigger( 'CREATE TRIGGER my_trigger AFTER INSERT ON config BEGIN INSERT INTO with_defaults VALUES (new.config_key, LENGTH(new.config_value));END', 'my_trigger'); late final View myView = View('my_view', 'CREATE VIEW my_view AS SELECT * FROM config WHERE sync_state = 2'); late final NoIds noIds = NoIds(this); late final WithConstraints withConstraints = WithConstraints(this); late final Mytable mytable = Mytable(this); late final Email email = Email(this); late final WeirdTable weirdTable = WeirdTable(this); Selectable readConfig(String var1) { return customSelect( 'SELECT config_key AS ck, config_value AS cf, sync_state AS cs1, sync_state_implicit AS cs2 FROM config WHERE config_key = ?', variables: [ Variable(var1) ], readsFrom: { config }).map((QueryRow row) => config.mapFromRowWithAlias(row, const { 'ck': 'config_key', 'cf': 'config_value', 'cs1': 'sync_state', 'cs2': 'sync_state_implicit', })); } Selectable readMultiple(List var1, {OrderBy clause = const OrderBy.nothing()}) { var $arrayStartIndex = 1; final expandedvar1 = $expandVar($arrayStartIndex, var1.length); $arrayStartIndex += var1.length; final generatedclause = $write(clause); $arrayStartIndex += generatedclause.amountOfVariables; return customSelect( 'SELECT * FROM config WHERE config_key IN ($expandedvar1) ${generatedclause.sql}', variables: [ for (var $ in var1) Variable($), ...generatedclause.introducedVariables ], readsFrom: { config }).map(config.mapFromRow); } Selectable readDynamic( {Expression predicate = const CustomExpression('(TRUE)')}) { final generatedpredicate = $write(predicate); return customSelect('SELECT * FROM config WHERE ${generatedpredicate.sql}', variables: [...generatedpredicate.introducedVariables], readsFrom: {config}).map(config.mapFromRow); } Selectable typeConverterVar(SyncType? var1, List var2) { var $arrayStartIndex = 2; final expandedvar2 = $expandVar($arrayStartIndex, var2.length); $arrayStartIndex += var2.length; return customSelect( 'SELECT config_key FROM config WHERE sync_state = ? OR sync_state_implicit IN ($expandedvar2)', variables: [ Variable(ConfigTable.$converter0.mapToSql(var1)), for (var $ in var2) Variable(ConfigTable.$converter1.mapToSql($)) ], readsFrom: { config }).map((QueryRow row) => row.read('config_key')); } Selectable tableValued() { return customSelect( 'SELECT "key", value FROM config,json_each(config.config_value)WHERE json_valid(config_value)', variables: [], readsFrom: {config}).map((QueryRow row) { return JsonResult( row: row, key: row.read('key'), value: row.read('value'), ); }); } Selectable another() { return customSelect( 'SELECT \'one\' AS "key", NULLIF(\'two\', \'another\') AS value', variables: [], readsFrom: {}).map((QueryRow row) { return JsonResult( row: row, key: row.read('key'), value: row.read('value'), ); }); } Selectable multiple({required Expression predicate}) { final generatedpredicate = $write(predicate, hasMultipleTables: true); return customSelect( 'SELECT d.*,"c"."a" AS "nested_0.a", "c"."b" AS "nested_0.b", "c"."c" AS "nested_0.c" FROM with_constraints AS c INNER JOIN with_defaults AS d ON d.a = c.a AND d.b = c.b WHERE ${generatedpredicate.sql}', variables: [...generatedpredicate.introducedVariables], readsFrom: {withConstraints, withDefaults}).map((QueryRow row) { return MultipleResult( row: row, a: row.read('a'), b: row.read('b'), c: withConstraints.mapFromRowOrNull(row, tablePrefix: 'nested_0'), ); }); } Selectable searchEmails({String? term}) { return customSelect( 'SELECT * FROM email WHERE email MATCH :term ORDER BY rank', variables: [Variable(term)], readsFrom: {email}).map(email.mapFromRow); } Selectable readRowId({required Expression expr}) { final generatedexpr = $write(expr); return customSelect( 'SELECT oid, * FROM config WHERE _rowid_ = ${generatedexpr.sql}', variables: [...generatedexpr.introducedVariables], readsFrom: {config}).map((QueryRow row) { return ReadRowIdResult( row: row, rowid: row.read('rowid'), configKey: row.read('config_key'), configValue: row.read('config_value'), syncState: ConfigTable.$converter0.mapToDart(row.read('sync_state')), syncStateImplicit: ConfigTable.$converter1 .mapToDart(row.read('sync_state_implicit')), ); }); } Selectable readView() { return customSelect('SELECT * FROM my_view', variables: [], readsFrom: {config}).map((QueryRow row) { return ReadViewResult( row: row, configKey: row.read('config_key'), configValue: row.read('config_value'), syncState: ConfigTable.$converter0.mapToDart(row.read('sync_state')), syncStateImplicit: ConfigTable.$converter1 .mapToDart(row.read('sync_state_implicit')), ); }); } Selectable cfeTest() { return customSelect( 'WITH RECURSIVE cnt(x)AS (SELECT 1 UNION ALL SELECT x + 1 FROM cnt LIMIT 1000000) SELECT x FROM cnt', variables: [], readsFrom: {}).map((QueryRow row) => row.read('x')); } Selectable nullableQuery() { return customSelect('SELECT MAX(oid) FROM config', variables: [], readsFrom: {config}).map((QueryRow row) => row.read('MAX(oid)')); } Future> addConfig( String var1, String? var2, SyncType? var3, SyncType? var4) { return customWriteReturning('INSERT INTO config VALUES (?, ?, ?, ?)', variables: [ Variable(var1), Variable(var2), Variable(ConfigTable.$converter0.mapToSql(var3)), Variable(ConfigTable.$converter1.mapToSql(var4)) ], updates: { config }).then(config.mapFromRow); } Future writeConfig({required String key, String? value}) { return customInsert( 'REPLACE INTO config (config_key, config_value) VALUES (:key, :value)', variables: [Variable(key), Variable(value)], updates: {config}, ); } @override Iterable get allTables => allSchemaEntities.whereType(); @override List get allSchemaEntities => [ config, valueIdx, withDefaults, myTrigger, myView, OnCreateQuery( 'INSERT INTO config (config_key, config_value) VALUES (\'key\', \'values\')'), noIds, withConstraints, mytable, email, weirdTable ]; @override StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules( [ WritePropagation( on: TableUpdateQuery.onTableName('config', limitUpdateKind: UpdateKind.insert), result: [ TableUpdate('with_defaults', kind: UpdateKind.insert), ], ), ], ); } class JsonResult extends CustomResultSet { final String key; final String? value; JsonResult({ required QueryRow row, required this.key, this.value, }) : super(row); @override int get hashCode => $mrjf($mrjc(key.hashCode, value.hashCode)); @override bool operator ==(dynamic other) => identical(this, other) || (other is JsonResult && other.key == this.key && other.value == this.value); @override String toString() { return (StringBuffer('JsonResult(') ..write('key: $key, ') ..write('value: $value') ..write(')')) .toString(); } } class MultipleResult extends CustomResultSet { final String? a; final int? b; final WithConstraint? c; MultipleResult({ required QueryRow row, this.a, this.b, this.c, }) : super(row); @override int get hashCode => $mrjf($mrjc(a.hashCode, $mrjc(b.hashCode, c.hashCode))); @override bool operator ==(dynamic other) => identical(this, other) || (other is MultipleResult && other.a == this.a && other.b == this.b && other.c == this.c); @override String toString() { return (StringBuffer('MultipleResult(') ..write('a: $a, ') ..write('b: $b, ') ..write('c: $c') ..write(')')) .toString(); } } class ReadRowIdResult extends CustomResultSet { final int rowid; final String configKey; final String? configValue; final SyncType? syncState; final SyncType? syncStateImplicit; ReadRowIdResult({ required QueryRow row, required this.rowid, required this.configKey, this.configValue, this.syncState, this.syncStateImplicit, }) : super(row); @override int get hashCode => $mrjf($mrjc( rowid.hashCode, $mrjc( configKey.hashCode, $mrjc(configValue.hashCode, $mrjc(syncState.hashCode, syncStateImplicit.hashCode))))); @override bool operator ==(dynamic other) => identical(this, other) || (other is ReadRowIdResult && other.rowid == this.rowid && other.configKey == this.configKey && other.configValue == this.configValue && other.syncState == this.syncState && other.syncStateImplicit == this.syncStateImplicit); @override String toString() { return (StringBuffer('ReadRowIdResult(') ..write('rowid: $rowid, ') ..write('configKey: $configKey, ') ..write('configValue: $configValue, ') ..write('syncState: $syncState, ') ..write('syncStateImplicit: $syncStateImplicit') ..write(')')) .toString(); } } class ReadViewResult extends CustomResultSet { final String configKey; final String? configValue; final SyncType? syncState; final SyncType? syncStateImplicit; ReadViewResult({ required QueryRow row, required this.configKey, this.configValue, this.syncState, this.syncStateImplicit, }) : super(row); @override int get hashCode => $mrjf($mrjc( configKey.hashCode, $mrjc(configValue.hashCode, $mrjc(syncState.hashCode, syncStateImplicit.hashCode)))); @override bool operator ==(dynamic other) => identical(this, other) || (other is ReadViewResult && other.configKey == this.configKey && other.configValue == this.configValue && other.syncState == this.syncState && other.syncStateImplicit == this.syncStateImplicit); @override String toString() { return (StringBuffer('ReadViewResult(') ..write('configKey: $configKey, ') ..write('configValue: $configValue, ') ..write('syncState: $syncState, ') ..write('syncStateImplicit: $syncStateImplicit') ..write(')')) .toString(); } }