1388 lines
48 KiB
Dart
1388 lines
48 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'database.dart';
|
|
|
|
// ignore_for_file: type=lint
|
|
class $MessagesTable extends Messages
|
|
with drift.TableInfo<$MessagesTable, Message> {
|
|
@override
|
|
final drift.GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$MessagesTable(this.attachedDatabase, [this._alias]);
|
|
static const drift.VerificationMeta _idMeta =
|
|
const drift.VerificationMeta('id');
|
|
@override
|
|
late final drift.GeneratedColumn<String> id = drift.GeneratedColumn<String>(
|
|
'id', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _countryMeta =
|
|
const drift.VerificationMeta('country');
|
|
@override
|
|
late final drift.GeneratedColumn<String> country =
|
|
drift.GeneratedColumn<String>('country', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _cityMeta =
|
|
const drift.VerificationMeta('city');
|
|
@override
|
|
late final drift.GeneratedColumn<String> city = drift.GeneratedColumn<String>(
|
|
'city', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _dateMeta =
|
|
const drift.VerificationMeta('date');
|
|
@override
|
|
late final drift.GeneratedColumn<DateTime> date =
|
|
drift.GeneratedColumn<DateTime>('date', aliasedName, false,
|
|
type: DriftSqlType.dateTime, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _activityMeta =
|
|
const drift.VerificationMeta('activity');
|
|
@override
|
|
late final drift.GeneratedColumn<int> activity = drift.GeneratedColumn<int>(
|
|
'activity', aliasedName, false,
|
|
type: DriftSqlType.int, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _draftMeta =
|
|
const drift.VerificationMeta('draft');
|
|
@override
|
|
late final drift.GeneratedColumn<int> draft = drift.GeneratedColumn<int>(
|
|
'draft', aliasedName, false,
|
|
type: DriftSqlType.int, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _thumbnailMeta =
|
|
const drift.VerificationMeta('thumbnail');
|
|
@override
|
|
late final drift.GeneratedColumn<String> thumbnail =
|
|
drift.GeneratedColumn<String>('thumbnail', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
@override
|
|
List<drift.GeneratedColumn> get $columns =>
|
|
[id, country, city, date, activity, draft, thumbnail];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'messages';
|
|
@override
|
|
drift.VerificationContext validateIntegrity(
|
|
drift.Insertable<Message> instance,
|
|
{bool isInserting = false}) {
|
|
final context = drift.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('country')) {
|
|
context.handle(_countryMeta,
|
|
country.isAcceptableOrUnknown(data['country']!, _countryMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_countryMeta);
|
|
}
|
|
if (data.containsKey('city')) {
|
|
context.handle(
|
|
_cityMeta, city.isAcceptableOrUnknown(data['city']!, _cityMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_cityMeta);
|
|
}
|
|
if (data.containsKey('date')) {
|
|
context.handle(
|
|
_dateMeta, date.isAcceptableOrUnknown(data['date']!, _dateMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_dateMeta);
|
|
}
|
|
if (data.containsKey('activity')) {
|
|
context.handle(_activityMeta,
|
|
activity.isAcceptableOrUnknown(data['activity']!, _activityMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_activityMeta);
|
|
}
|
|
if (data.containsKey('draft')) {
|
|
context.handle(
|
|
_draftMeta, draft.isAcceptableOrUnknown(data['draft']!, _draftMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_draftMeta);
|
|
}
|
|
if (data.containsKey('thumbnail')) {
|
|
context.handle(_thumbnailMeta,
|
|
thumbnail.isAcceptableOrUnknown(data['thumbnail']!, _thumbnailMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_thumbnailMeta);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<drift.GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Message map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return Message(
|
|
id: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
|
|
country: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}country'])!,
|
|
city: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}city'])!,
|
|
date: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.dateTime, data['${effectivePrefix}date'])!,
|
|
activity: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.int, data['${effectivePrefix}activity'])!,
|
|
draft: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.int, data['${effectivePrefix}draft'])!,
|
|
thumbnail: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}thumbnail'])!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$MessagesTable createAlias(String alias) {
|
|
return $MessagesTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class Message extends drift.DataClass implements drift.Insertable<Message> {
|
|
final String id;
|
|
final String country;
|
|
final String city;
|
|
final DateTime date;
|
|
final int activity;
|
|
final int draft;
|
|
final String thumbnail;
|
|
const Message(
|
|
{required this.id,
|
|
required this.country,
|
|
required this.city,
|
|
required this.date,
|
|
required this.activity,
|
|
required this.draft,
|
|
required this.thumbnail});
|
|
@override
|
|
Map<String, drift.Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, drift.Expression>{};
|
|
map['id'] = drift.Variable<String>(id);
|
|
map['country'] = drift.Variable<String>(country);
|
|
map['city'] = drift.Variable<String>(city);
|
|
map['date'] = drift.Variable<DateTime>(date);
|
|
map['activity'] = drift.Variable<int>(activity);
|
|
map['draft'] = drift.Variable<int>(draft);
|
|
map['thumbnail'] = drift.Variable<String>(thumbnail);
|
|
return map;
|
|
}
|
|
|
|
MessagesCompanion toCompanion(bool nullToAbsent) {
|
|
return MessagesCompanion(
|
|
id: drift.Value(id),
|
|
country: drift.Value(country),
|
|
city: drift.Value(city),
|
|
date: drift.Value(date),
|
|
activity: drift.Value(activity),
|
|
draft: drift.Value(draft),
|
|
thumbnail: drift.Value(thumbnail),
|
|
);
|
|
}
|
|
|
|
factory Message.fromJson(Map<String, dynamic> json,
|
|
{ValueSerializer? serializer}) {
|
|
serializer ??= drift.driftRuntimeOptions.defaultSerializer;
|
|
return Message(
|
|
id: serializer.fromJson<String>(json['id']),
|
|
country: serializer.fromJson<String>(json['country']),
|
|
city: serializer.fromJson<String>(json['city']),
|
|
date: serializer.fromJson<DateTime>(json['date']),
|
|
activity: serializer.fromJson<int>(json['activity']),
|
|
draft: serializer.fromJson<int>(json['draft']),
|
|
thumbnail: serializer.fromJson<String>(json['thumbnail']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= drift.driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<String>(id),
|
|
'country': serializer.toJson<String>(country),
|
|
'city': serializer.toJson<String>(city),
|
|
'date': serializer.toJson<DateTime>(date),
|
|
'activity': serializer.toJson<int>(activity),
|
|
'draft': serializer.toJson<int>(draft),
|
|
'thumbnail': serializer.toJson<String>(thumbnail),
|
|
};
|
|
}
|
|
|
|
Message copyWith(
|
|
{String? id,
|
|
String? country,
|
|
String? city,
|
|
DateTime? date,
|
|
int? activity,
|
|
int? draft,
|
|
String? thumbnail}) =>
|
|
Message(
|
|
id: id ?? this.id,
|
|
country: country ?? this.country,
|
|
city: city ?? this.city,
|
|
date: date ?? this.date,
|
|
activity: activity ?? this.activity,
|
|
draft: draft ?? this.draft,
|
|
thumbnail: thumbnail ?? this.thumbnail,
|
|
);
|
|
Message copyWithCompanion(MessagesCompanion data) {
|
|
return Message(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
country: data.country.present ? data.country.value : this.country,
|
|
city: data.city.present ? data.city.value : this.city,
|
|
date: data.date.present ? data.date.value : this.date,
|
|
activity: data.activity.present ? data.activity.value : this.activity,
|
|
draft: data.draft.present ? data.draft.value : this.draft,
|
|
thumbnail: data.thumbnail.present ? data.thumbnail.value : this.thumbnail,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('Message(')
|
|
..write('id: $id, ')
|
|
..write('country: $country, ')
|
|
..write('city: $city, ')
|
|
..write('date: $date, ')
|
|
..write('activity: $activity, ')
|
|
..write('draft: $draft, ')
|
|
..write('thumbnail: $thumbnail')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(id, country, city, date, activity, draft, thumbnail);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is Message &&
|
|
other.id == this.id &&
|
|
other.country == this.country &&
|
|
other.city == this.city &&
|
|
other.date == this.date &&
|
|
other.activity == this.activity &&
|
|
other.draft == this.draft &&
|
|
other.thumbnail == this.thumbnail);
|
|
}
|
|
|
|
class MessagesCompanion extends drift.UpdateCompanion<Message> {
|
|
final drift.Value<String> id;
|
|
final drift.Value<String> country;
|
|
final drift.Value<String> city;
|
|
final drift.Value<DateTime> date;
|
|
final drift.Value<int> activity;
|
|
final drift.Value<int> draft;
|
|
final drift.Value<String> thumbnail;
|
|
final drift.Value<int> rowid;
|
|
const MessagesCompanion({
|
|
this.id = const drift.Value.absent(),
|
|
this.country = const drift.Value.absent(),
|
|
this.city = const drift.Value.absent(),
|
|
this.date = const drift.Value.absent(),
|
|
this.activity = const drift.Value.absent(),
|
|
this.draft = const drift.Value.absent(),
|
|
this.thumbnail = const drift.Value.absent(),
|
|
this.rowid = const drift.Value.absent(),
|
|
});
|
|
MessagesCompanion.insert({
|
|
required String id,
|
|
required String country,
|
|
required String city,
|
|
required DateTime date,
|
|
required int activity,
|
|
required int draft,
|
|
required String thumbnail,
|
|
this.rowid = const drift.Value.absent(),
|
|
}) : id = drift.Value(id),
|
|
country = drift.Value(country),
|
|
city = drift.Value(city),
|
|
date = drift.Value(date),
|
|
activity = drift.Value(activity),
|
|
draft = drift.Value(draft),
|
|
thumbnail = drift.Value(thumbnail);
|
|
static drift.Insertable<Message> custom({
|
|
drift.Expression<String>? id,
|
|
drift.Expression<String>? country,
|
|
drift.Expression<String>? city,
|
|
drift.Expression<DateTime>? date,
|
|
drift.Expression<int>? activity,
|
|
drift.Expression<int>? draft,
|
|
drift.Expression<String>? thumbnail,
|
|
drift.Expression<int>? rowid,
|
|
}) {
|
|
return drift.RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (country != null) 'country': country,
|
|
if (city != null) 'city': city,
|
|
if (date != null) 'date': date,
|
|
if (activity != null) 'activity': activity,
|
|
if (draft != null) 'draft': draft,
|
|
if (thumbnail != null) 'thumbnail': thumbnail,
|
|
if (rowid != null) 'rowid': rowid,
|
|
});
|
|
}
|
|
|
|
MessagesCompanion copyWith(
|
|
{drift.Value<String>? id,
|
|
drift.Value<String>? country,
|
|
drift.Value<String>? city,
|
|
drift.Value<DateTime>? date,
|
|
drift.Value<int>? activity,
|
|
drift.Value<int>? draft,
|
|
drift.Value<String>? thumbnail,
|
|
drift.Value<int>? rowid}) {
|
|
return MessagesCompanion(
|
|
id: id ?? this.id,
|
|
country: country ?? this.country,
|
|
city: city ?? this.city,
|
|
date: date ?? this.date,
|
|
activity: activity ?? this.activity,
|
|
draft: draft ?? this.draft,
|
|
thumbnail: thumbnail ?? this.thumbnail,
|
|
rowid: rowid ?? this.rowid,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, drift.Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, drift.Expression>{};
|
|
if (id.present) {
|
|
map['id'] = drift.Variable<String>(id.value);
|
|
}
|
|
if (country.present) {
|
|
map['country'] = drift.Variable<String>(country.value);
|
|
}
|
|
if (city.present) {
|
|
map['city'] = drift.Variable<String>(city.value);
|
|
}
|
|
if (date.present) {
|
|
map['date'] = drift.Variable<DateTime>(date.value);
|
|
}
|
|
if (activity.present) {
|
|
map['activity'] = drift.Variable<int>(activity.value);
|
|
}
|
|
if (draft.present) {
|
|
map['draft'] = drift.Variable<int>(draft.value);
|
|
}
|
|
if (thumbnail.present) {
|
|
map['thumbnail'] = drift.Variable<String>(thumbnail.value);
|
|
}
|
|
if (rowid.present) {
|
|
map['rowid'] = drift.Variable<int>(rowid.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('MessagesCompanion(')
|
|
..write('id: $id, ')
|
|
..write('country: $country, ')
|
|
..write('city: $city, ')
|
|
..write('date: $date, ')
|
|
..write('activity: $activity, ')
|
|
..write('draft: $draft, ')
|
|
..write('thumbnail: $thumbnail, ')
|
|
..write('rowid: $rowid')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $TranslationsTable extends Translations
|
|
with drift.TableInfo<$TranslationsTable, Translation> {
|
|
@override
|
|
final drift.GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$TranslationsTable(this.attachedDatabase, [this._alias]);
|
|
static const drift.VerificationMeta _messageIdMeta =
|
|
const drift.VerificationMeta('messageId');
|
|
@override
|
|
late final drift.GeneratedColumn<String> messageId =
|
|
drift.GeneratedColumn<String>('message_id', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _titleMeta =
|
|
const drift.VerificationMeta('title');
|
|
@override
|
|
late final drift.GeneratedColumn<String> title =
|
|
drift.GeneratedColumn<String>('title', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _bodyMeta =
|
|
const drift.VerificationMeta('body');
|
|
@override
|
|
late final drift.GeneratedColumn<String> body = drift.GeneratedColumn<String>(
|
|
'body', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _languagesCodeMeta =
|
|
const drift.VerificationMeta('languagesCode');
|
|
@override
|
|
late final drift.GeneratedColumn<String> languagesCode =
|
|
drift.GeneratedColumn<String>('languages_code', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
static const drift.VerificationMeta _pdfMeta =
|
|
const drift.VerificationMeta('pdf');
|
|
@override
|
|
late final drift.GeneratedColumn<String> pdf = drift.GeneratedColumn<String>(
|
|
'pdf', aliasedName, true,
|
|
type: DriftSqlType.string, requiredDuringInsert: false);
|
|
@override
|
|
List<drift.GeneratedColumn> get $columns =>
|
|
[messageId, title, body, languagesCode, pdf];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'translations';
|
|
@override
|
|
drift.VerificationContext validateIntegrity(
|
|
drift.Insertable<Translation> instance,
|
|
{bool isInserting = false}) {
|
|
final context = drift.VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('message_id')) {
|
|
context.handle(_messageIdMeta,
|
|
messageId.isAcceptableOrUnknown(data['message_id']!, _messageIdMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_messageIdMeta);
|
|
}
|
|
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);
|
|
}
|
|
if (data.containsKey('languages_code')) {
|
|
context.handle(
|
|
_languagesCodeMeta,
|
|
languagesCode.isAcceptableOrUnknown(
|
|
data['languages_code']!, _languagesCodeMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_languagesCodeMeta);
|
|
}
|
|
if (data.containsKey('pdf')) {
|
|
context.handle(
|
|
_pdfMeta, pdf.isAcceptableOrUnknown(data['pdf']!, _pdfMeta));
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<drift.GeneratedColumn> get $primaryKey => {messageId, languagesCode};
|
|
@override
|
|
Translation map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return Translation(
|
|
messageId: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}message_id'])!,
|
|
title: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}title'])!,
|
|
body: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}body'])!,
|
|
languagesCode: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}languages_code'])!,
|
|
pdf: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}pdf']),
|
|
);
|
|
}
|
|
|
|
@override
|
|
$TranslationsTable createAlias(String alias) {
|
|
return $TranslationsTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class Translation extends drift.DataClass
|
|
implements drift.Insertable<Translation> {
|
|
final String messageId;
|
|
final String title;
|
|
final String body;
|
|
final String languagesCode;
|
|
final String? pdf;
|
|
const Translation(
|
|
{required this.messageId,
|
|
required this.title,
|
|
required this.body,
|
|
required this.languagesCode,
|
|
this.pdf});
|
|
@override
|
|
Map<String, drift.Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, drift.Expression>{};
|
|
map['message_id'] = drift.Variable<String>(messageId);
|
|
map['title'] = drift.Variable<String>(title);
|
|
map['body'] = drift.Variable<String>(body);
|
|
map['languages_code'] = drift.Variable<String>(languagesCode);
|
|
if (!nullToAbsent || pdf != null) {
|
|
map['pdf'] = drift.Variable<String>(pdf);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
TranslationsCompanion toCompanion(bool nullToAbsent) {
|
|
return TranslationsCompanion(
|
|
messageId: drift.Value(messageId),
|
|
title: drift.Value(title),
|
|
body: drift.Value(body),
|
|
languagesCode: drift.Value(languagesCode),
|
|
pdf: pdf == null && nullToAbsent
|
|
? const drift.Value.absent()
|
|
: drift.Value(pdf),
|
|
);
|
|
}
|
|
|
|
factory Translation.fromJson(Map<String, dynamic> json,
|
|
{ValueSerializer? serializer}) {
|
|
serializer ??= drift.driftRuntimeOptions.defaultSerializer;
|
|
return Translation(
|
|
messageId: serializer.fromJson<String>(json['messageId']),
|
|
title: serializer.fromJson<String>(json['title']),
|
|
body: serializer.fromJson<String>(json['body']),
|
|
languagesCode: serializer.fromJson<String>(json['languagesCode']),
|
|
pdf: serializer.fromJson<String?>(json['pdf']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= drift.driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'messageId': serializer.toJson<String>(messageId),
|
|
'title': serializer.toJson<String>(title),
|
|
'body': serializer.toJson<String>(body),
|
|
'languagesCode': serializer.toJson<String>(languagesCode),
|
|
'pdf': serializer.toJson<String?>(pdf),
|
|
};
|
|
}
|
|
|
|
Translation copyWith(
|
|
{String? messageId,
|
|
String? title,
|
|
String? body,
|
|
String? languagesCode,
|
|
drift.Value<String?> pdf = const drift.Value.absent()}) =>
|
|
Translation(
|
|
messageId: messageId ?? this.messageId,
|
|
title: title ?? this.title,
|
|
body: body ?? this.body,
|
|
languagesCode: languagesCode ?? this.languagesCode,
|
|
pdf: pdf.present ? pdf.value : this.pdf,
|
|
);
|
|
Translation copyWithCompanion(TranslationsCompanion data) {
|
|
return Translation(
|
|
messageId: data.messageId.present ? data.messageId.value : this.messageId,
|
|
title: data.title.present ? data.title.value : this.title,
|
|
body: data.body.present ? data.body.value : this.body,
|
|
languagesCode: data.languagesCode.present
|
|
? data.languagesCode.value
|
|
: this.languagesCode,
|
|
pdf: data.pdf.present ? data.pdf.value : this.pdf,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('Translation(')
|
|
..write('messageId: $messageId, ')
|
|
..write('title: $title, ')
|
|
..write('body: $body, ')
|
|
..write('languagesCode: $languagesCode, ')
|
|
..write('pdf: $pdf')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(messageId, title, body, languagesCode, pdf);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is Translation &&
|
|
other.messageId == this.messageId &&
|
|
other.title == this.title &&
|
|
other.body == this.body &&
|
|
other.languagesCode == this.languagesCode &&
|
|
other.pdf == this.pdf);
|
|
}
|
|
|
|
class TranslationsCompanion extends drift.UpdateCompanion<Translation> {
|
|
final drift.Value<String> messageId;
|
|
final drift.Value<String> title;
|
|
final drift.Value<String> body;
|
|
final drift.Value<String> languagesCode;
|
|
final drift.Value<String?> pdf;
|
|
final drift.Value<int> rowid;
|
|
const TranslationsCompanion({
|
|
this.messageId = const drift.Value.absent(),
|
|
this.title = const drift.Value.absent(),
|
|
this.body = const drift.Value.absent(),
|
|
this.languagesCode = const drift.Value.absent(),
|
|
this.pdf = const drift.Value.absent(),
|
|
this.rowid = const drift.Value.absent(),
|
|
});
|
|
TranslationsCompanion.insert({
|
|
required String messageId,
|
|
required String title,
|
|
required String body,
|
|
required String languagesCode,
|
|
this.pdf = const drift.Value.absent(),
|
|
this.rowid = const drift.Value.absent(),
|
|
}) : messageId = drift.Value(messageId),
|
|
title = drift.Value(title),
|
|
body = drift.Value(body),
|
|
languagesCode = drift.Value(languagesCode);
|
|
static drift.Insertable<Translation> custom({
|
|
drift.Expression<String>? messageId,
|
|
drift.Expression<String>? title,
|
|
drift.Expression<String>? body,
|
|
drift.Expression<String>? languagesCode,
|
|
drift.Expression<String>? pdf,
|
|
drift.Expression<int>? rowid,
|
|
}) {
|
|
return drift.RawValuesInsertable({
|
|
if (messageId != null) 'message_id': messageId,
|
|
if (title != null) 'title': title,
|
|
if (body != null) 'body': body,
|
|
if (languagesCode != null) 'languages_code': languagesCode,
|
|
if (pdf != null) 'pdf': pdf,
|
|
if (rowid != null) 'rowid': rowid,
|
|
});
|
|
}
|
|
|
|
TranslationsCompanion copyWith(
|
|
{drift.Value<String>? messageId,
|
|
drift.Value<String>? title,
|
|
drift.Value<String>? body,
|
|
drift.Value<String>? languagesCode,
|
|
drift.Value<String?>? pdf,
|
|
drift.Value<int>? rowid}) {
|
|
return TranslationsCompanion(
|
|
messageId: messageId ?? this.messageId,
|
|
title: title ?? this.title,
|
|
body: body ?? this.body,
|
|
languagesCode: languagesCode ?? this.languagesCode,
|
|
pdf: pdf ?? this.pdf,
|
|
rowid: rowid ?? this.rowid,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, drift.Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, drift.Expression>{};
|
|
if (messageId.present) {
|
|
map['message_id'] = drift.Variable<String>(messageId.value);
|
|
}
|
|
if (title.present) {
|
|
map['title'] = drift.Variable<String>(title.value);
|
|
}
|
|
if (body.present) {
|
|
map['body'] = drift.Variable<String>(body.value);
|
|
}
|
|
if (languagesCode.present) {
|
|
map['languages_code'] = drift.Variable<String>(languagesCode.value);
|
|
}
|
|
if (pdf.present) {
|
|
map['pdf'] = drift.Variable<String>(pdf.value);
|
|
}
|
|
if (rowid.present) {
|
|
map['rowid'] = drift.Variable<int>(rowid.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('TranslationsCompanion(')
|
|
..write('messageId: $messageId, ')
|
|
..write('title: $title, ')
|
|
..write('body: $body, ')
|
|
..write('languagesCode: $languagesCode, ')
|
|
..write('pdf: $pdf, ')
|
|
..write('rowid: $rowid')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $FavoritesTable extends Favorites
|
|
with drift.TableInfo<$FavoritesTable, Favorite> {
|
|
@override
|
|
final drift.GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$FavoritesTable(this.attachedDatabase, [this._alias]);
|
|
static const drift.VerificationMeta _idMeta =
|
|
const drift.VerificationMeta('id');
|
|
@override
|
|
late final drift.GeneratedColumn<String> id = drift.GeneratedColumn<String>(
|
|
'id', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
@override
|
|
List<drift.GeneratedColumn> get $columns => [id];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'favorites';
|
|
@override
|
|
drift.VerificationContext validateIntegrity(
|
|
drift.Insertable<Favorite> instance,
|
|
{bool isInserting = false}) {
|
|
final context = drift.VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('id')) {
|
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
|
} else if (isInserting) {
|
|
context.missing(_idMeta);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<drift.GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Favorite map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return Favorite(
|
|
id: attachedDatabase.typeMapping
|
|
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$FavoritesTable createAlias(String alias) {
|
|
return $FavoritesTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class Favorite extends drift.DataClass implements drift.Insertable<Favorite> {
|
|
final String id;
|
|
const Favorite({required this.id});
|
|
@override
|
|
Map<String, drift.Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, drift.Expression>{};
|
|
map['id'] = drift.Variable<String>(id);
|
|
return map;
|
|
}
|
|
|
|
FavoritesCompanion toCompanion(bool nullToAbsent) {
|
|
return FavoritesCompanion(
|
|
id: drift.Value(id),
|
|
);
|
|
}
|
|
|
|
factory Favorite.fromJson(Map<String, dynamic> json,
|
|
{ValueSerializer? serializer}) {
|
|
serializer ??= drift.driftRuntimeOptions.defaultSerializer;
|
|
return Favorite(
|
|
id: serializer.fromJson<String>(json['id']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= drift.driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<String>(id),
|
|
};
|
|
}
|
|
|
|
Favorite copyWith({String? id}) => Favorite(
|
|
id: id ?? this.id,
|
|
);
|
|
Favorite copyWithCompanion(FavoritesCompanion data) {
|
|
return Favorite(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('Favorite(')
|
|
..write('id: $id')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => id.hashCode;
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) || (other is Favorite && other.id == this.id);
|
|
}
|
|
|
|
class FavoritesCompanion extends drift.UpdateCompanion<Favorite> {
|
|
final drift.Value<String> id;
|
|
final drift.Value<int> rowid;
|
|
const FavoritesCompanion({
|
|
this.id = const drift.Value.absent(),
|
|
this.rowid = const drift.Value.absent(),
|
|
});
|
|
FavoritesCompanion.insert({
|
|
required String id,
|
|
this.rowid = const drift.Value.absent(),
|
|
}) : id = drift.Value(id);
|
|
static drift.Insertable<Favorite> custom({
|
|
drift.Expression<String>? id,
|
|
drift.Expression<int>? rowid,
|
|
}) {
|
|
return drift.RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (rowid != null) 'rowid': rowid,
|
|
});
|
|
}
|
|
|
|
FavoritesCompanion copyWith(
|
|
{drift.Value<String>? id, drift.Value<int>? rowid}) {
|
|
return FavoritesCompanion(
|
|
id: id ?? this.id,
|
|
rowid: rowid ?? this.rowid,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, drift.Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, drift.Expression>{};
|
|
if (id.present) {
|
|
map['id'] = drift.Variable<String>(id.value);
|
|
}
|
|
if (rowid.present) {
|
|
map['rowid'] = drift.Variable<int>(rowid.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('FavoritesCompanion(')
|
|
..write('id: $id, ')
|
|
..write('rowid: $rowid')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
abstract class _$AppDatabase extends drift.GeneratedDatabase {
|
|
_$AppDatabase(QueryExecutor e) : super(e);
|
|
$AppDatabaseManager get managers => $AppDatabaseManager(this);
|
|
late final $MessagesTable messages = $MessagesTable(this);
|
|
late final $TranslationsTable translations = $TranslationsTable(this);
|
|
late final $FavoritesTable favorites = $FavoritesTable(this);
|
|
late final drift.Index titleIndex = drift.Index(
|
|
'title_index', 'CREATE INDEX title_index ON translations (title)');
|
|
late final drift.Index bodyIndex = drift.Index(
|
|
'body_index', 'CREATE INDEX body_index ON translations (body)');
|
|
late final drift.Index messageIdIndex = drift.Index('message_id_index',
|
|
'CREATE INDEX message_id_index ON translations (message_id)');
|
|
@override
|
|
Iterable<drift.TableInfo<drift.Table, Object?>> get allTables =>
|
|
allSchemaEntities.whereType<drift.TableInfo<drift.Table, Object?>>();
|
|
@override
|
|
List<drift.DatabaseSchemaEntity> get allSchemaEntities => [
|
|
messages,
|
|
translations,
|
|
favorites,
|
|
titleIndex,
|
|
bodyIndex,
|
|
messageIdIndex
|
|
];
|
|
}
|
|
|
|
typedef $$MessagesTableCreateCompanionBuilder = MessagesCompanion Function({
|
|
required String id,
|
|
required String country,
|
|
required String city,
|
|
required DateTime date,
|
|
required int activity,
|
|
required int draft,
|
|
required String thumbnail,
|
|
drift.Value<int> rowid,
|
|
});
|
|
typedef $$MessagesTableUpdateCompanionBuilder = MessagesCompanion Function({
|
|
drift.Value<String> id,
|
|
drift.Value<String> country,
|
|
drift.Value<String> city,
|
|
drift.Value<DateTime> date,
|
|
drift.Value<int> activity,
|
|
drift.Value<int> draft,
|
|
drift.Value<String> thumbnail,
|
|
drift.Value<int> rowid,
|
|
});
|
|
|
|
class $$MessagesTableFilterComposer
|
|
extends drift.Composer<_$AppDatabase, $MessagesTable> {
|
|
$$MessagesTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.ColumnFilters<String> get id => $composableBuilder(
|
|
column: $table.id, builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<String> get country => $composableBuilder(
|
|
column: $table.country, builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<String> get city => $composableBuilder(
|
|
column: $table.city, builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<DateTime> get date => $composableBuilder(
|
|
column: $table.date, builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<int> get activity => $composableBuilder(
|
|
column: $table.activity,
|
|
builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<int> get draft => $composableBuilder(
|
|
column: $table.draft, builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<String> get thumbnail => $composableBuilder(
|
|
column: $table.thumbnail,
|
|
builder: (column) => drift.ColumnFilters(column));
|
|
}
|
|
|
|
class $$MessagesTableOrderingComposer
|
|
extends drift.Composer<_$AppDatabase, $MessagesTable> {
|
|
$$MessagesTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.ColumnOrderings<String> get id => $composableBuilder(
|
|
column: $table.id, builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<String> get country => $composableBuilder(
|
|
column: $table.country,
|
|
builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<String> get city => $composableBuilder(
|
|
column: $table.city, builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<DateTime> get date => $composableBuilder(
|
|
column: $table.date, builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<int> get activity => $composableBuilder(
|
|
column: $table.activity,
|
|
builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<int> get draft => $composableBuilder(
|
|
column: $table.draft, builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<String> get thumbnail => $composableBuilder(
|
|
column: $table.thumbnail,
|
|
builder: (column) => drift.ColumnOrderings(column));
|
|
}
|
|
|
|
class $$MessagesTableAnnotationComposer
|
|
extends drift.Composer<_$AppDatabase, $MessagesTable> {
|
|
$$MessagesTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.GeneratedColumn<String> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<String> get country =>
|
|
$composableBuilder(column: $table.country, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<String> get city =>
|
|
$composableBuilder(column: $table.city, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<DateTime> get date =>
|
|
$composableBuilder(column: $table.date, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<int> get activity =>
|
|
$composableBuilder(column: $table.activity, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<int> get draft =>
|
|
$composableBuilder(column: $table.draft, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<String> get thumbnail =>
|
|
$composableBuilder(column: $table.thumbnail, builder: (column) => column);
|
|
}
|
|
|
|
class $$MessagesTableTableManager extends drift.RootTableManager<
|
|
_$AppDatabase,
|
|
$MessagesTable,
|
|
Message,
|
|
$$MessagesTableFilterComposer,
|
|
$$MessagesTableOrderingComposer,
|
|
$$MessagesTableAnnotationComposer,
|
|
$$MessagesTableCreateCompanionBuilder,
|
|
$$MessagesTableUpdateCompanionBuilder,
|
|
(Message, drift.BaseReferences<_$AppDatabase, $MessagesTable, Message>),
|
|
Message,
|
|
drift.PrefetchHooks Function()> {
|
|
$$MessagesTableTableManager(_$AppDatabase db, $MessagesTable table)
|
|
: super(drift.TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer: () =>
|
|
$$MessagesTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer: () =>
|
|
$$MessagesTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer: () =>
|
|
$$MessagesTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback: ({
|
|
drift.Value<String> id = const drift.Value.absent(),
|
|
drift.Value<String> country = const drift.Value.absent(),
|
|
drift.Value<String> city = const drift.Value.absent(),
|
|
drift.Value<DateTime> date = const drift.Value.absent(),
|
|
drift.Value<int> activity = const drift.Value.absent(),
|
|
drift.Value<int> draft = const drift.Value.absent(),
|
|
drift.Value<String> thumbnail = const drift.Value.absent(),
|
|
drift.Value<int> rowid = const drift.Value.absent(),
|
|
}) =>
|
|
MessagesCompanion(
|
|
id: id,
|
|
country: country,
|
|
city: city,
|
|
date: date,
|
|
activity: activity,
|
|
draft: draft,
|
|
thumbnail: thumbnail,
|
|
rowid: rowid,
|
|
),
|
|
createCompanionCallback: ({
|
|
required String id,
|
|
required String country,
|
|
required String city,
|
|
required DateTime date,
|
|
required int activity,
|
|
required int draft,
|
|
required String thumbnail,
|
|
drift.Value<int> rowid = const drift.Value.absent(),
|
|
}) =>
|
|
MessagesCompanion.insert(
|
|
id: id,
|
|
country: country,
|
|
city: city,
|
|
date: date,
|
|
activity: activity,
|
|
draft: draft,
|
|
thumbnail: thumbnail,
|
|
rowid: rowid,
|
|
),
|
|
withReferenceMapper: (p0) => p0
|
|
.map((e) =>
|
|
(e.readTable(table), drift.BaseReferences(db, table, e)))
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
));
|
|
}
|
|
|
|
typedef $$MessagesTableProcessedTableManager = drift.ProcessedTableManager<
|
|
_$AppDatabase,
|
|
$MessagesTable,
|
|
Message,
|
|
$$MessagesTableFilterComposer,
|
|
$$MessagesTableOrderingComposer,
|
|
$$MessagesTableAnnotationComposer,
|
|
$$MessagesTableCreateCompanionBuilder,
|
|
$$MessagesTableUpdateCompanionBuilder,
|
|
(Message, drift.BaseReferences<_$AppDatabase, $MessagesTable, Message>),
|
|
Message,
|
|
drift.PrefetchHooks Function()>;
|
|
typedef $$TranslationsTableCreateCompanionBuilder = TranslationsCompanion
|
|
Function({
|
|
required String messageId,
|
|
required String title,
|
|
required String body,
|
|
required String languagesCode,
|
|
drift.Value<String?> pdf,
|
|
drift.Value<int> rowid,
|
|
});
|
|
typedef $$TranslationsTableUpdateCompanionBuilder = TranslationsCompanion
|
|
Function({
|
|
drift.Value<String> messageId,
|
|
drift.Value<String> title,
|
|
drift.Value<String> body,
|
|
drift.Value<String> languagesCode,
|
|
drift.Value<String?> pdf,
|
|
drift.Value<int> rowid,
|
|
});
|
|
|
|
class $$TranslationsTableFilterComposer
|
|
extends drift.Composer<_$AppDatabase, $TranslationsTable> {
|
|
$$TranslationsTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.ColumnFilters<String> get messageId => $composableBuilder(
|
|
column: $table.messageId,
|
|
builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<String> get title => $composableBuilder(
|
|
column: $table.title, builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<String> get body => $composableBuilder(
|
|
column: $table.body, builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<String> get languagesCode => $composableBuilder(
|
|
column: $table.languagesCode,
|
|
builder: (column) => drift.ColumnFilters(column));
|
|
|
|
drift.ColumnFilters<String> get pdf => $composableBuilder(
|
|
column: $table.pdf, builder: (column) => drift.ColumnFilters(column));
|
|
}
|
|
|
|
class $$TranslationsTableOrderingComposer
|
|
extends drift.Composer<_$AppDatabase, $TranslationsTable> {
|
|
$$TranslationsTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.ColumnOrderings<String> get messageId => $composableBuilder(
|
|
column: $table.messageId,
|
|
builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<String> get title => $composableBuilder(
|
|
column: $table.title, builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<String> get body => $composableBuilder(
|
|
column: $table.body, builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<String> get languagesCode => $composableBuilder(
|
|
column: $table.languagesCode,
|
|
builder: (column) => drift.ColumnOrderings(column));
|
|
|
|
drift.ColumnOrderings<String> get pdf => $composableBuilder(
|
|
column: $table.pdf, builder: (column) => drift.ColumnOrderings(column));
|
|
}
|
|
|
|
class $$TranslationsTableAnnotationComposer
|
|
extends drift.Composer<_$AppDatabase, $TranslationsTable> {
|
|
$$TranslationsTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.GeneratedColumn<String> get messageId =>
|
|
$composableBuilder(column: $table.messageId, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<String> get title =>
|
|
$composableBuilder(column: $table.title, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<String> get body =>
|
|
$composableBuilder(column: $table.body, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<String> get languagesCode => $composableBuilder(
|
|
column: $table.languagesCode, builder: (column) => column);
|
|
|
|
drift.GeneratedColumn<String> get pdf =>
|
|
$composableBuilder(column: $table.pdf, builder: (column) => column);
|
|
}
|
|
|
|
class $$TranslationsTableTableManager extends drift.RootTableManager<
|
|
_$AppDatabase,
|
|
$TranslationsTable,
|
|
Translation,
|
|
$$TranslationsTableFilterComposer,
|
|
$$TranslationsTableOrderingComposer,
|
|
$$TranslationsTableAnnotationComposer,
|
|
$$TranslationsTableCreateCompanionBuilder,
|
|
$$TranslationsTableUpdateCompanionBuilder,
|
|
(
|
|
Translation,
|
|
drift.BaseReferences<_$AppDatabase, $TranslationsTable, Translation>
|
|
),
|
|
Translation,
|
|
drift.PrefetchHooks Function()> {
|
|
$$TranslationsTableTableManager(_$AppDatabase db, $TranslationsTable table)
|
|
: super(drift.TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer: () =>
|
|
$$TranslationsTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer: () =>
|
|
$$TranslationsTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer: () =>
|
|
$$TranslationsTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback: ({
|
|
drift.Value<String> messageId = const drift.Value.absent(),
|
|
drift.Value<String> title = const drift.Value.absent(),
|
|
drift.Value<String> body = const drift.Value.absent(),
|
|
drift.Value<String> languagesCode = const drift.Value.absent(),
|
|
drift.Value<String?> pdf = const drift.Value.absent(),
|
|
drift.Value<int> rowid = const drift.Value.absent(),
|
|
}) =>
|
|
TranslationsCompanion(
|
|
messageId: messageId,
|
|
title: title,
|
|
body: body,
|
|
languagesCode: languagesCode,
|
|
pdf: pdf,
|
|
rowid: rowid,
|
|
),
|
|
createCompanionCallback: ({
|
|
required String messageId,
|
|
required String title,
|
|
required String body,
|
|
required String languagesCode,
|
|
drift.Value<String?> pdf = const drift.Value.absent(),
|
|
drift.Value<int> rowid = const drift.Value.absent(),
|
|
}) =>
|
|
TranslationsCompanion.insert(
|
|
messageId: messageId,
|
|
title: title,
|
|
body: body,
|
|
languagesCode: languagesCode,
|
|
pdf: pdf,
|
|
rowid: rowid,
|
|
),
|
|
withReferenceMapper: (p0) => p0
|
|
.map((e) =>
|
|
(e.readTable(table), drift.BaseReferences(db, table, e)))
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
));
|
|
}
|
|
|
|
typedef $$TranslationsTableProcessedTableManager = drift.ProcessedTableManager<
|
|
_$AppDatabase,
|
|
$TranslationsTable,
|
|
Translation,
|
|
$$TranslationsTableFilterComposer,
|
|
$$TranslationsTableOrderingComposer,
|
|
$$TranslationsTableAnnotationComposer,
|
|
$$TranslationsTableCreateCompanionBuilder,
|
|
$$TranslationsTableUpdateCompanionBuilder,
|
|
(
|
|
Translation,
|
|
drift.BaseReferences<_$AppDatabase, $TranslationsTable, Translation>
|
|
),
|
|
Translation,
|
|
drift.PrefetchHooks Function()>;
|
|
typedef $$FavoritesTableCreateCompanionBuilder = FavoritesCompanion Function({
|
|
required String id,
|
|
drift.Value<int> rowid,
|
|
});
|
|
typedef $$FavoritesTableUpdateCompanionBuilder = FavoritesCompanion Function({
|
|
drift.Value<String> id,
|
|
drift.Value<int> rowid,
|
|
});
|
|
|
|
class $$FavoritesTableFilterComposer
|
|
extends drift.Composer<_$AppDatabase, $FavoritesTable> {
|
|
$$FavoritesTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.ColumnFilters<String> get id => $composableBuilder(
|
|
column: $table.id, builder: (column) => drift.ColumnFilters(column));
|
|
}
|
|
|
|
class $$FavoritesTableOrderingComposer
|
|
extends drift.Composer<_$AppDatabase, $FavoritesTable> {
|
|
$$FavoritesTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.ColumnOrderings<String> get id => $composableBuilder(
|
|
column: $table.id, builder: (column) => drift.ColumnOrderings(column));
|
|
}
|
|
|
|
class $$FavoritesTableAnnotationComposer
|
|
extends drift.Composer<_$AppDatabase, $FavoritesTable> {
|
|
$$FavoritesTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
drift.GeneratedColumn<String> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
}
|
|
|
|
class $$FavoritesTableTableManager extends drift.RootTableManager<
|
|
_$AppDatabase,
|
|
$FavoritesTable,
|
|
Favorite,
|
|
$$FavoritesTableFilterComposer,
|
|
$$FavoritesTableOrderingComposer,
|
|
$$FavoritesTableAnnotationComposer,
|
|
$$FavoritesTableCreateCompanionBuilder,
|
|
$$FavoritesTableUpdateCompanionBuilder,
|
|
(Favorite, drift.BaseReferences<_$AppDatabase, $FavoritesTable, Favorite>),
|
|
Favorite,
|
|
drift.PrefetchHooks Function()> {
|
|
$$FavoritesTableTableManager(_$AppDatabase db, $FavoritesTable table)
|
|
: super(drift.TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer: () =>
|
|
$$FavoritesTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer: () =>
|
|
$$FavoritesTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer: () =>
|
|
$$FavoritesTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback: ({
|
|
drift.Value<String> id = const drift.Value.absent(),
|
|
drift.Value<int> rowid = const drift.Value.absent(),
|
|
}) =>
|
|
FavoritesCompanion(
|
|
id: id,
|
|
rowid: rowid,
|
|
),
|
|
createCompanionCallback: ({
|
|
required String id,
|
|
drift.Value<int> rowid = const drift.Value.absent(),
|
|
}) =>
|
|
FavoritesCompanion.insert(
|
|
id: id,
|
|
rowid: rowid,
|
|
),
|
|
withReferenceMapper: (p0) => p0
|
|
.map((e) =>
|
|
(e.readTable(table), drift.BaseReferences(db, table, e)))
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
));
|
|
}
|
|
|
|
typedef $$FavoritesTableProcessedTableManager = drift.ProcessedTableManager<
|
|
_$AppDatabase,
|
|
$FavoritesTable,
|
|
Favorite,
|
|
$$FavoritesTableFilterComposer,
|
|
$$FavoritesTableOrderingComposer,
|
|
$$FavoritesTableAnnotationComposer,
|
|
$$FavoritesTableCreateCompanionBuilder,
|
|
$$FavoritesTableUpdateCompanionBuilder,
|
|
(Favorite, drift.BaseReferences<_$AppDatabase, $FavoritesTable, Favorite>),
|
|
Favorite,
|
|
drift.PrefetchHooks Function()>;
|
|
|
|
class $AppDatabaseManager {
|
|
final _$AppDatabase _db;
|
|
$AppDatabaseManager(this._db);
|
|
$$MessagesTableTableManager get messages =>
|
|
$$MessagesTableTableManager(_db, _db.messages);
|
|
$$TranslationsTableTableManager get translations =>
|
|
$$TranslationsTableTableManager(_db, _db.translations);
|
|
$$FavoritesTableTableManager get favorites =>
|
|
$$FavoritesTableTableManager(_db, _db.favorites);
|
|
}
|