2760 lines
84 KiB
Dart
2760 lines
84 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'database.dart';
|
|
|
|
// ignore_for_file: type=lint
|
|
class $HistoryItemsTable extends HistoryItems
|
|
with TableInfo<$HistoryItemsTable, HistoryItem> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$HistoryItemsTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
|
@override
|
|
late final GeneratedColumn<int> id = GeneratedColumn<int>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
hasAutoIncrement: true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
|
'PRIMARY KEY AUTOINCREMENT',
|
|
),
|
|
);
|
|
static const VerificationMeta _urlMeta = const VerificationMeta('url');
|
|
@override
|
|
late final GeneratedColumn<String> url = GeneratedColumn<String>(
|
|
'url',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _titleMeta = const VerificationMeta('title');
|
|
@override
|
|
late final GeneratedColumn<String> title = GeneratedColumn<String>(
|
|
'title',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _visitedAtMeta = const VerificationMeta(
|
|
'visitedAt',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<DateTime> visitedAt = GeneratedColumn<DateTime>(
|
|
'visited_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.dateTime,
|
|
requiredDuringInsert: false,
|
|
defaultValue: currentDateAndTime,
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [id, url, title, visitedAt];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'history_items';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<HistoryItem> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('id')) {
|
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
|
}
|
|
if (data.containsKey('url')) {
|
|
context.handle(
|
|
_urlMeta,
|
|
url.isAcceptableOrUnknown(data['url']!, _urlMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_urlMeta);
|
|
}
|
|
if (data.containsKey('title')) {
|
|
context.handle(
|
|
_titleMeta,
|
|
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('visited_at')) {
|
|
context.handle(
|
|
_visitedAtMeta,
|
|
visitedAt.isAcceptableOrUnknown(data['visited_at']!, _visitedAtMeta),
|
|
);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
HistoryItem map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return HistoryItem(
|
|
id: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}id'],
|
|
)!,
|
|
url: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}url'],
|
|
)!,
|
|
title: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}title'],
|
|
),
|
|
visitedAt: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.dateTime,
|
|
data['${effectivePrefix}visited_at'],
|
|
)!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$HistoryItemsTable createAlias(String alias) {
|
|
return $HistoryItemsTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class HistoryItem extends DataClass implements Insertable<HistoryItem> {
|
|
final int id;
|
|
final String url;
|
|
final String? title;
|
|
final DateTime visitedAt;
|
|
const HistoryItem({
|
|
required this.id,
|
|
required this.url,
|
|
this.title,
|
|
required this.visitedAt,
|
|
});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['id'] = Variable<int>(id);
|
|
map['url'] = Variable<String>(url);
|
|
if (!nullToAbsent || title != null) {
|
|
map['title'] = Variable<String>(title);
|
|
}
|
|
map['visited_at'] = Variable<DateTime>(visitedAt);
|
|
return map;
|
|
}
|
|
|
|
HistoryItemsCompanion toCompanion(bool nullToAbsent) {
|
|
return HistoryItemsCompanion(
|
|
id: Value(id),
|
|
url: Value(url),
|
|
title: title == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(title),
|
|
visitedAt: Value(visitedAt),
|
|
);
|
|
}
|
|
|
|
factory HistoryItem.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return HistoryItem(
|
|
id: serializer.fromJson<int>(json['id']),
|
|
url: serializer.fromJson<String>(json['url']),
|
|
title: serializer.fromJson<String?>(json['title']),
|
|
visitedAt: serializer.fromJson<DateTime>(json['visitedAt']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<int>(id),
|
|
'url': serializer.toJson<String>(url),
|
|
'title': serializer.toJson<String?>(title),
|
|
'visitedAt': serializer.toJson<DateTime>(visitedAt),
|
|
};
|
|
}
|
|
|
|
HistoryItem copyWith({
|
|
int? id,
|
|
String? url,
|
|
Value<String?> title = const Value.absent(),
|
|
DateTime? visitedAt,
|
|
}) => HistoryItem(
|
|
id: id ?? this.id,
|
|
url: url ?? this.url,
|
|
title: title.present ? title.value : this.title,
|
|
visitedAt: visitedAt ?? this.visitedAt,
|
|
);
|
|
HistoryItem copyWithCompanion(HistoryItemsCompanion data) {
|
|
return HistoryItem(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
url: data.url.present ? data.url.value : this.url,
|
|
title: data.title.present ? data.title.value : this.title,
|
|
visitedAt: data.visitedAt.present ? data.visitedAt.value : this.visitedAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('HistoryItem(')
|
|
..write('id: $id, ')
|
|
..write('url: $url, ')
|
|
..write('title: $title, ')
|
|
..write('visitedAt: $visitedAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(id, url, title, visitedAt);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is HistoryItem &&
|
|
other.id == this.id &&
|
|
other.url == this.url &&
|
|
other.title == this.title &&
|
|
other.visitedAt == this.visitedAt);
|
|
}
|
|
|
|
class HistoryItemsCompanion extends UpdateCompanion<HistoryItem> {
|
|
final Value<int> id;
|
|
final Value<String> url;
|
|
final Value<String?> title;
|
|
final Value<DateTime> visitedAt;
|
|
const HistoryItemsCompanion({
|
|
this.id = const Value.absent(),
|
|
this.url = const Value.absent(),
|
|
this.title = const Value.absent(),
|
|
this.visitedAt = const Value.absent(),
|
|
});
|
|
HistoryItemsCompanion.insert({
|
|
this.id = const Value.absent(),
|
|
required String url,
|
|
this.title = const Value.absent(),
|
|
this.visitedAt = const Value.absent(),
|
|
}) : url = Value(url);
|
|
static Insertable<HistoryItem> custom({
|
|
Expression<int>? id,
|
|
Expression<String>? url,
|
|
Expression<String>? title,
|
|
Expression<DateTime>? visitedAt,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (url != null) 'url': url,
|
|
if (title != null) 'title': title,
|
|
if (visitedAt != null) 'visited_at': visitedAt,
|
|
});
|
|
}
|
|
|
|
HistoryItemsCompanion copyWith({
|
|
Value<int>? id,
|
|
Value<String>? url,
|
|
Value<String?>? title,
|
|
Value<DateTime>? visitedAt,
|
|
}) {
|
|
return HistoryItemsCompanion(
|
|
id: id ?? this.id,
|
|
url: url ?? this.url,
|
|
title: title ?? this.title,
|
|
visitedAt: visitedAt ?? this.visitedAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (id.present) {
|
|
map['id'] = Variable<int>(id.value);
|
|
}
|
|
if (url.present) {
|
|
map['url'] = Variable<String>(url.value);
|
|
}
|
|
if (title.present) {
|
|
map['title'] = Variable<String>(title.value);
|
|
}
|
|
if (visitedAt.present) {
|
|
map['visited_at'] = Variable<DateTime>(visitedAt.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('HistoryItemsCompanion(')
|
|
..write('id: $id, ')
|
|
..write('url: $url, ')
|
|
..write('title: $title, ')
|
|
..write('visitedAt: $visitedAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $BookmarksTable extends Bookmarks
|
|
with TableInfo<$BookmarksTable, Bookmark> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$BookmarksTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
|
@override
|
|
late final GeneratedColumn<int> id = GeneratedColumn<int>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
hasAutoIncrement: true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
|
'PRIMARY KEY AUTOINCREMENT',
|
|
),
|
|
);
|
|
static const VerificationMeta _urlMeta = const VerificationMeta('url');
|
|
@override
|
|
late final GeneratedColumn<String> url = GeneratedColumn<String>(
|
|
'url',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _titleMeta = const VerificationMeta('title');
|
|
@override
|
|
late final GeneratedColumn<String> title = GeneratedColumn<String>(
|
|
'title',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
|
'createdAt',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.dateTime,
|
|
requiredDuringInsert: false,
|
|
defaultValue: currentDateAndTime,
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [id, url, title, createdAt];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'bookmarks';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<Bookmark> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('id')) {
|
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
|
}
|
|
if (data.containsKey('url')) {
|
|
context.handle(
|
|
_urlMeta,
|
|
url.isAcceptableOrUnknown(data['url']!, _urlMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_urlMeta);
|
|
}
|
|
if (data.containsKey('title')) {
|
|
context.handle(
|
|
_titleMeta,
|
|
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('created_at')) {
|
|
context.handle(
|
|
_createdAtMeta,
|
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
|
|
);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Bookmark map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return Bookmark(
|
|
id: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}id'],
|
|
)!,
|
|
url: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}url'],
|
|
)!,
|
|
title: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}title'],
|
|
),
|
|
createdAt: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.dateTime,
|
|
data['${effectivePrefix}created_at'],
|
|
)!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$BookmarksTable createAlias(String alias) {
|
|
return $BookmarksTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class Bookmark extends DataClass implements Insertable<Bookmark> {
|
|
final int id;
|
|
final String url;
|
|
final String? title;
|
|
final DateTime createdAt;
|
|
const Bookmark({
|
|
required this.id,
|
|
required this.url,
|
|
this.title,
|
|
required this.createdAt,
|
|
});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['id'] = Variable<int>(id);
|
|
map['url'] = Variable<String>(url);
|
|
if (!nullToAbsent || title != null) {
|
|
map['title'] = Variable<String>(title);
|
|
}
|
|
map['created_at'] = Variable<DateTime>(createdAt);
|
|
return map;
|
|
}
|
|
|
|
BookmarksCompanion toCompanion(bool nullToAbsent) {
|
|
return BookmarksCompanion(
|
|
id: Value(id),
|
|
url: Value(url),
|
|
title: title == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(title),
|
|
createdAt: Value(createdAt),
|
|
);
|
|
}
|
|
|
|
factory Bookmark.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return Bookmark(
|
|
id: serializer.fromJson<int>(json['id']),
|
|
url: serializer.fromJson<String>(json['url']),
|
|
title: serializer.fromJson<String?>(json['title']),
|
|
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<int>(id),
|
|
'url': serializer.toJson<String>(url),
|
|
'title': serializer.toJson<String?>(title),
|
|
'createdAt': serializer.toJson<DateTime>(createdAt),
|
|
};
|
|
}
|
|
|
|
Bookmark copyWith({
|
|
int? id,
|
|
String? url,
|
|
Value<String?> title = const Value.absent(),
|
|
DateTime? createdAt,
|
|
}) => Bookmark(
|
|
id: id ?? this.id,
|
|
url: url ?? this.url,
|
|
title: title.present ? title.value : this.title,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
);
|
|
Bookmark copyWithCompanion(BookmarksCompanion data) {
|
|
return Bookmark(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
url: data.url.present ? data.url.value : this.url,
|
|
title: data.title.present ? data.title.value : this.title,
|
|
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('Bookmark(')
|
|
..write('id: $id, ')
|
|
..write('url: $url, ')
|
|
..write('title: $title, ')
|
|
..write('createdAt: $createdAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(id, url, title, createdAt);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is Bookmark &&
|
|
other.id == this.id &&
|
|
other.url == this.url &&
|
|
other.title == this.title &&
|
|
other.createdAt == this.createdAt);
|
|
}
|
|
|
|
class BookmarksCompanion extends UpdateCompanion<Bookmark> {
|
|
final Value<int> id;
|
|
final Value<String> url;
|
|
final Value<String?> title;
|
|
final Value<DateTime> createdAt;
|
|
const BookmarksCompanion({
|
|
this.id = const Value.absent(),
|
|
this.url = const Value.absent(),
|
|
this.title = const Value.absent(),
|
|
this.createdAt = const Value.absent(),
|
|
});
|
|
BookmarksCompanion.insert({
|
|
this.id = const Value.absent(),
|
|
required String url,
|
|
this.title = const Value.absent(),
|
|
this.createdAt = const Value.absent(),
|
|
}) : url = Value(url);
|
|
static Insertable<Bookmark> custom({
|
|
Expression<int>? id,
|
|
Expression<String>? url,
|
|
Expression<String>? title,
|
|
Expression<DateTime>? createdAt,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (url != null) 'url': url,
|
|
if (title != null) 'title': title,
|
|
if (createdAt != null) 'created_at': createdAt,
|
|
});
|
|
}
|
|
|
|
BookmarksCompanion copyWith({
|
|
Value<int>? id,
|
|
Value<String>? url,
|
|
Value<String?>? title,
|
|
Value<DateTime>? createdAt,
|
|
}) {
|
|
return BookmarksCompanion(
|
|
id: id ?? this.id,
|
|
url: url ?? this.url,
|
|
title: title ?? this.title,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (id.present) {
|
|
map['id'] = Variable<int>(id.value);
|
|
}
|
|
if (url.present) {
|
|
map['url'] = Variable<String>(url.value);
|
|
}
|
|
if (title.present) {
|
|
map['title'] = Variable<String>(title.value);
|
|
}
|
|
if (createdAt.present) {
|
|
map['created_at'] = Variable<DateTime>(createdAt.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('BookmarksCompanion(')
|
|
..write('id: $id, ')
|
|
..write('url: $url, ')
|
|
..write('title: $title, ')
|
|
..write('createdAt: $createdAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $SubscriptionsTable extends Subscriptions
|
|
with TableInfo<$SubscriptionsTable, Subscription> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$SubscriptionsTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
|
@override
|
|
late final GeneratedColumn<int> id = GeneratedColumn<int>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
hasAutoIncrement: true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
|
'PRIMARY KEY AUTOINCREMENT',
|
|
),
|
|
);
|
|
static const VerificationMeta _urlMeta = const VerificationMeta('url');
|
|
@override
|
|
late final GeneratedColumn<String> url = GeneratedColumn<String>(
|
|
'url',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _titleMeta = const VerificationMeta('title');
|
|
@override
|
|
late final GeneratedColumn<String> title = GeneratedColumn<String>(
|
|
'title',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _entryUrlsMeta = const VerificationMeta(
|
|
'entryUrls',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<String> entryUrls = GeneratedColumn<String>(
|
|
'entry_urls',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
defaultValue: const Constant('[]'),
|
|
);
|
|
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
|
'createdAt',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.dateTime,
|
|
requiredDuringInsert: false,
|
|
defaultValue: currentDateAndTime,
|
|
);
|
|
static const VerificationMeta _lastCheckedAtMeta = const VerificationMeta(
|
|
'lastCheckedAt',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<DateTime> lastCheckedAt =
|
|
GeneratedColumn<DateTime>(
|
|
'last_checked_at',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.dateTime,
|
|
requiredDuringInsert: false,
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
url,
|
|
title,
|
|
entryUrls,
|
|
createdAt,
|
|
lastCheckedAt,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'subscriptions';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<Subscription> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('id')) {
|
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
|
}
|
|
if (data.containsKey('url')) {
|
|
context.handle(
|
|
_urlMeta,
|
|
url.isAcceptableOrUnknown(data['url']!, _urlMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_urlMeta);
|
|
}
|
|
if (data.containsKey('title')) {
|
|
context.handle(
|
|
_titleMeta,
|
|
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('entry_urls')) {
|
|
context.handle(
|
|
_entryUrlsMeta,
|
|
entryUrls.isAcceptableOrUnknown(data['entry_urls']!, _entryUrlsMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('created_at')) {
|
|
context.handle(
|
|
_createdAtMeta,
|
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('last_checked_at')) {
|
|
context.handle(
|
|
_lastCheckedAtMeta,
|
|
lastCheckedAt.isAcceptableOrUnknown(
|
|
data['last_checked_at']!,
|
|
_lastCheckedAtMeta,
|
|
),
|
|
);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Subscription map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return Subscription(
|
|
id: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}id'],
|
|
)!,
|
|
url: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}url'],
|
|
)!,
|
|
title: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}title'],
|
|
),
|
|
entryUrls: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}entry_urls'],
|
|
)!,
|
|
createdAt: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.dateTime,
|
|
data['${effectivePrefix}created_at'],
|
|
)!,
|
|
lastCheckedAt: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.dateTime,
|
|
data['${effectivePrefix}last_checked_at'],
|
|
),
|
|
);
|
|
}
|
|
|
|
@override
|
|
$SubscriptionsTable createAlias(String alias) {
|
|
return $SubscriptionsTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class Subscription extends DataClass implements Insertable<Subscription> {
|
|
final int id;
|
|
final String url;
|
|
final String? title;
|
|
final String entryUrls;
|
|
final DateTime createdAt;
|
|
final DateTime? lastCheckedAt;
|
|
const Subscription({
|
|
required this.id,
|
|
required this.url,
|
|
this.title,
|
|
required this.entryUrls,
|
|
required this.createdAt,
|
|
this.lastCheckedAt,
|
|
});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['id'] = Variable<int>(id);
|
|
map['url'] = Variable<String>(url);
|
|
if (!nullToAbsent || title != null) {
|
|
map['title'] = Variable<String>(title);
|
|
}
|
|
map['entry_urls'] = Variable<String>(entryUrls);
|
|
map['created_at'] = Variable<DateTime>(createdAt);
|
|
if (!nullToAbsent || lastCheckedAt != null) {
|
|
map['last_checked_at'] = Variable<DateTime>(lastCheckedAt);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
SubscriptionsCompanion toCompanion(bool nullToAbsent) {
|
|
return SubscriptionsCompanion(
|
|
id: Value(id),
|
|
url: Value(url),
|
|
title: title == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(title),
|
|
entryUrls: Value(entryUrls),
|
|
createdAt: Value(createdAt),
|
|
lastCheckedAt: lastCheckedAt == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(lastCheckedAt),
|
|
);
|
|
}
|
|
|
|
factory Subscription.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return Subscription(
|
|
id: serializer.fromJson<int>(json['id']),
|
|
url: serializer.fromJson<String>(json['url']),
|
|
title: serializer.fromJson<String?>(json['title']),
|
|
entryUrls: serializer.fromJson<String>(json['entryUrls']),
|
|
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
|
lastCheckedAt: serializer.fromJson<DateTime?>(json['lastCheckedAt']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<int>(id),
|
|
'url': serializer.toJson<String>(url),
|
|
'title': serializer.toJson<String?>(title),
|
|
'entryUrls': serializer.toJson<String>(entryUrls),
|
|
'createdAt': serializer.toJson<DateTime>(createdAt),
|
|
'lastCheckedAt': serializer.toJson<DateTime?>(lastCheckedAt),
|
|
};
|
|
}
|
|
|
|
Subscription copyWith({
|
|
int? id,
|
|
String? url,
|
|
Value<String?> title = const Value.absent(),
|
|
String? entryUrls,
|
|
DateTime? createdAt,
|
|
Value<DateTime?> lastCheckedAt = const Value.absent(),
|
|
}) => Subscription(
|
|
id: id ?? this.id,
|
|
url: url ?? this.url,
|
|
title: title.present ? title.value : this.title,
|
|
entryUrls: entryUrls ?? this.entryUrls,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
lastCheckedAt: lastCheckedAt.present
|
|
? lastCheckedAt.value
|
|
: this.lastCheckedAt,
|
|
);
|
|
Subscription copyWithCompanion(SubscriptionsCompanion data) {
|
|
return Subscription(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
url: data.url.present ? data.url.value : this.url,
|
|
title: data.title.present ? data.title.value : this.title,
|
|
entryUrls: data.entryUrls.present ? data.entryUrls.value : this.entryUrls,
|
|
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
|
lastCheckedAt: data.lastCheckedAt.present
|
|
? data.lastCheckedAt.value
|
|
: this.lastCheckedAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('Subscription(')
|
|
..write('id: $id, ')
|
|
..write('url: $url, ')
|
|
..write('title: $title, ')
|
|
..write('entryUrls: $entryUrls, ')
|
|
..write('createdAt: $createdAt, ')
|
|
..write('lastCheckedAt: $lastCheckedAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(id, url, title, entryUrls, createdAt, lastCheckedAt);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is Subscription &&
|
|
other.id == this.id &&
|
|
other.url == this.url &&
|
|
other.title == this.title &&
|
|
other.entryUrls == this.entryUrls &&
|
|
other.createdAt == this.createdAt &&
|
|
other.lastCheckedAt == this.lastCheckedAt);
|
|
}
|
|
|
|
class SubscriptionsCompanion extends UpdateCompanion<Subscription> {
|
|
final Value<int> id;
|
|
final Value<String> url;
|
|
final Value<String?> title;
|
|
final Value<String> entryUrls;
|
|
final Value<DateTime> createdAt;
|
|
final Value<DateTime?> lastCheckedAt;
|
|
const SubscriptionsCompanion({
|
|
this.id = const Value.absent(),
|
|
this.url = const Value.absent(),
|
|
this.title = const Value.absent(),
|
|
this.entryUrls = const Value.absent(),
|
|
this.createdAt = const Value.absent(),
|
|
this.lastCheckedAt = const Value.absent(),
|
|
});
|
|
SubscriptionsCompanion.insert({
|
|
this.id = const Value.absent(),
|
|
required String url,
|
|
this.title = const Value.absent(),
|
|
this.entryUrls = const Value.absent(),
|
|
this.createdAt = const Value.absent(),
|
|
this.lastCheckedAt = const Value.absent(),
|
|
}) : url = Value(url);
|
|
static Insertable<Subscription> custom({
|
|
Expression<int>? id,
|
|
Expression<String>? url,
|
|
Expression<String>? title,
|
|
Expression<String>? entryUrls,
|
|
Expression<DateTime>? createdAt,
|
|
Expression<DateTime>? lastCheckedAt,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (url != null) 'url': url,
|
|
if (title != null) 'title': title,
|
|
if (entryUrls != null) 'entry_urls': entryUrls,
|
|
if (createdAt != null) 'created_at': createdAt,
|
|
if (lastCheckedAt != null) 'last_checked_at': lastCheckedAt,
|
|
});
|
|
}
|
|
|
|
SubscriptionsCompanion copyWith({
|
|
Value<int>? id,
|
|
Value<String>? url,
|
|
Value<String?>? title,
|
|
Value<String>? entryUrls,
|
|
Value<DateTime>? createdAt,
|
|
Value<DateTime?>? lastCheckedAt,
|
|
}) {
|
|
return SubscriptionsCompanion(
|
|
id: id ?? this.id,
|
|
url: url ?? this.url,
|
|
title: title ?? this.title,
|
|
entryUrls: entryUrls ?? this.entryUrls,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
lastCheckedAt: lastCheckedAt ?? this.lastCheckedAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (id.present) {
|
|
map['id'] = Variable<int>(id.value);
|
|
}
|
|
if (url.present) {
|
|
map['url'] = Variable<String>(url.value);
|
|
}
|
|
if (title.present) {
|
|
map['title'] = Variable<String>(title.value);
|
|
}
|
|
if (entryUrls.present) {
|
|
map['entry_urls'] = Variable<String>(entryUrls.value);
|
|
}
|
|
if (createdAt.present) {
|
|
map['created_at'] = Variable<DateTime>(createdAt.value);
|
|
}
|
|
if (lastCheckedAt.present) {
|
|
map['last_checked_at'] = Variable<DateTime>(lastCheckedAt.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('SubscriptionsCompanion(')
|
|
..write('id: $id, ')
|
|
..write('url: $url, ')
|
|
..write('title: $title, ')
|
|
..write('entryUrls: $entryUrls, ')
|
|
..write('createdAt: $createdAt, ')
|
|
..write('lastCheckedAt: $lastCheckedAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $ReaderSettingsTable extends ReaderSettings
|
|
with TableInfo<$ReaderSettingsTable, ReaderSetting> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$ReaderSettingsTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
|
@override
|
|
late final GeneratedColumn<int> id = GeneratedColumn<int>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
defaultValue: const Constant(0),
|
|
);
|
|
static const VerificationMeta _fontMeta = const VerificationMeta('font');
|
|
@override
|
|
late final GeneratedColumn<String> font = GeneratedColumn<String>(
|
|
'font',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
defaultValue: const Constant('Atkinson Hyperlegible'),
|
|
);
|
|
static const VerificationMeta _fontScaleMeta = const VerificationMeta(
|
|
'fontScale',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<double> fontScale = GeneratedColumn<double>(
|
|
'font_scale',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: false,
|
|
defaultValue: const Constant(1.0),
|
|
);
|
|
static const VerificationMeta _themeModeMeta = const VerificationMeta(
|
|
'themeMode',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<String> themeMode = GeneratedColumn<String>(
|
|
'theme_mode',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
defaultValue: const Constant('system'),
|
|
);
|
|
static const VerificationMeta _variantMeta = const VerificationMeta(
|
|
'variant',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<String> variant = GeneratedColumn<String>(
|
|
'variant',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
defaultValue: const Constant('site'),
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
font,
|
|
fontScale,
|
|
themeMode,
|
|
variant,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'reader_settings';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<ReaderSetting> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('id')) {
|
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
|
}
|
|
if (data.containsKey('font')) {
|
|
context.handle(
|
|
_fontMeta,
|
|
font.isAcceptableOrUnknown(data['font']!, _fontMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('font_scale')) {
|
|
context.handle(
|
|
_fontScaleMeta,
|
|
fontScale.isAcceptableOrUnknown(data['font_scale']!, _fontScaleMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('theme_mode')) {
|
|
context.handle(
|
|
_themeModeMeta,
|
|
themeMode.isAcceptableOrUnknown(data['theme_mode']!, _themeModeMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('variant')) {
|
|
context.handle(
|
|
_variantMeta,
|
|
variant.isAcceptableOrUnknown(data['variant']!, _variantMeta),
|
|
);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
ReaderSetting map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return ReaderSetting(
|
|
id: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.int,
|
|
data['${effectivePrefix}id'],
|
|
)!,
|
|
font: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}font'],
|
|
)!,
|
|
fontScale: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.double,
|
|
data['${effectivePrefix}font_scale'],
|
|
)!,
|
|
themeMode: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}theme_mode'],
|
|
)!,
|
|
variant: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}variant'],
|
|
)!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$ReaderSettingsTable createAlias(String alias) {
|
|
return $ReaderSettingsTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class ReaderSetting extends DataClass implements Insertable<ReaderSetting> {
|
|
final int id;
|
|
final String font;
|
|
final double fontScale;
|
|
final String themeMode;
|
|
final String variant;
|
|
const ReaderSetting({
|
|
required this.id,
|
|
required this.font,
|
|
required this.fontScale,
|
|
required this.themeMode,
|
|
required this.variant,
|
|
});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['id'] = Variable<int>(id);
|
|
map['font'] = Variable<String>(font);
|
|
map['font_scale'] = Variable<double>(fontScale);
|
|
map['theme_mode'] = Variable<String>(themeMode);
|
|
map['variant'] = Variable<String>(variant);
|
|
return map;
|
|
}
|
|
|
|
ReaderSettingsCompanion toCompanion(bool nullToAbsent) {
|
|
return ReaderSettingsCompanion(
|
|
id: Value(id),
|
|
font: Value(font),
|
|
fontScale: Value(fontScale),
|
|
themeMode: Value(themeMode),
|
|
variant: Value(variant),
|
|
);
|
|
}
|
|
|
|
factory ReaderSetting.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return ReaderSetting(
|
|
id: serializer.fromJson<int>(json['id']),
|
|
font: serializer.fromJson<String>(json['font']),
|
|
fontScale: serializer.fromJson<double>(json['fontScale']),
|
|
themeMode: serializer.fromJson<String>(json['themeMode']),
|
|
variant: serializer.fromJson<String>(json['variant']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'id': serializer.toJson<int>(id),
|
|
'font': serializer.toJson<String>(font),
|
|
'fontScale': serializer.toJson<double>(fontScale),
|
|
'themeMode': serializer.toJson<String>(themeMode),
|
|
'variant': serializer.toJson<String>(variant),
|
|
};
|
|
}
|
|
|
|
ReaderSetting copyWith({
|
|
int? id,
|
|
String? font,
|
|
double? fontScale,
|
|
String? themeMode,
|
|
String? variant,
|
|
}) => ReaderSetting(
|
|
id: id ?? this.id,
|
|
font: font ?? this.font,
|
|
fontScale: fontScale ?? this.fontScale,
|
|
themeMode: themeMode ?? this.themeMode,
|
|
variant: variant ?? this.variant,
|
|
);
|
|
ReaderSetting copyWithCompanion(ReaderSettingsCompanion data) {
|
|
return ReaderSetting(
|
|
id: data.id.present ? data.id.value : this.id,
|
|
font: data.font.present ? data.font.value : this.font,
|
|
fontScale: data.fontScale.present ? data.fontScale.value : this.fontScale,
|
|
themeMode: data.themeMode.present ? data.themeMode.value : this.themeMode,
|
|
variant: data.variant.present ? data.variant.value : this.variant,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('ReaderSetting(')
|
|
..write('id: $id, ')
|
|
..write('font: $font, ')
|
|
..write('fontScale: $fontScale, ')
|
|
..write('themeMode: $themeMode, ')
|
|
..write('variant: $variant')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(id, font, fontScale, themeMode, variant);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is ReaderSetting &&
|
|
other.id == this.id &&
|
|
other.font == this.font &&
|
|
other.fontScale == this.fontScale &&
|
|
other.themeMode == this.themeMode &&
|
|
other.variant == this.variant);
|
|
}
|
|
|
|
class ReaderSettingsCompanion extends UpdateCompanion<ReaderSetting> {
|
|
final Value<int> id;
|
|
final Value<String> font;
|
|
final Value<double> fontScale;
|
|
final Value<String> themeMode;
|
|
final Value<String> variant;
|
|
const ReaderSettingsCompanion({
|
|
this.id = const Value.absent(),
|
|
this.font = const Value.absent(),
|
|
this.fontScale = const Value.absent(),
|
|
this.themeMode = const Value.absent(),
|
|
this.variant = const Value.absent(),
|
|
});
|
|
ReaderSettingsCompanion.insert({
|
|
this.id = const Value.absent(),
|
|
this.font = const Value.absent(),
|
|
this.fontScale = const Value.absent(),
|
|
this.themeMode = const Value.absent(),
|
|
this.variant = const Value.absent(),
|
|
});
|
|
static Insertable<ReaderSetting> custom({
|
|
Expression<int>? id,
|
|
Expression<String>? font,
|
|
Expression<double>? fontScale,
|
|
Expression<String>? themeMode,
|
|
Expression<String>? variant,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (id != null) 'id': id,
|
|
if (font != null) 'font': font,
|
|
if (fontScale != null) 'font_scale': fontScale,
|
|
if (themeMode != null) 'theme_mode': themeMode,
|
|
if (variant != null) 'variant': variant,
|
|
});
|
|
}
|
|
|
|
ReaderSettingsCompanion copyWith({
|
|
Value<int>? id,
|
|
Value<String>? font,
|
|
Value<double>? fontScale,
|
|
Value<String>? themeMode,
|
|
Value<String>? variant,
|
|
}) {
|
|
return ReaderSettingsCompanion(
|
|
id: id ?? this.id,
|
|
font: font ?? this.font,
|
|
fontScale: fontScale ?? this.fontScale,
|
|
themeMode: themeMode ?? this.themeMode,
|
|
variant: variant ?? this.variant,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (id.present) {
|
|
map['id'] = Variable<int>(id.value);
|
|
}
|
|
if (font.present) {
|
|
map['font'] = Variable<String>(font.value);
|
|
}
|
|
if (fontScale.present) {
|
|
map['font_scale'] = Variable<double>(fontScale.value);
|
|
}
|
|
if (themeMode.present) {
|
|
map['theme_mode'] = Variable<String>(themeMode.value);
|
|
}
|
|
if (variant.present) {
|
|
map['variant'] = Variable<String>(variant.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('ReaderSettingsCompanion(')
|
|
..write('id: $id, ')
|
|
..write('font: $font, ')
|
|
..write('fontScale: $fontScale, ')
|
|
..write('themeMode: $themeMode, ')
|
|
..write('variant: $variant')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
class $CachedPagesTable extends CachedPages
|
|
with TableInfo<$CachedPagesTable, CachedPage> {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
$CachedPagesTable(this.attachedDatabase, [this._alias]);
|
|
static const VerificationMeta _urlMeta = const VerificationMeta('url');
|
|
@override
|
|
late final GeneratedColumn<String> url = GeneratedColumn<String>(
|
|
'url',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _titleMeta = const VerificationMeta('title');
|
|
@override
|
|
late final GeneratedColumn<String> title = GeneratedColumn<String>(
|
|
'title',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _sourceMeta = const VerificationMeta('source');
|
|
@override
|
|
late final GeneratedColumn<String> source = GeneratedColumn<String>(
|
|
'source',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
);
|
|
static const VerificationMeta _etagMeta = const VerificationMeta('etag');
|
|
@override
|
|
late final GeneratedColumn<String> etag = GeneratedColumn<String>(
|
|
'etag',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _lastModifiedMeta = const VerificationMeta(
|
|
'lastModified',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<String> lastModified = GeneratedColumn<String>(
|
|
'last_modified',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
);
|
|
static const VerificationMeta _cachedAtMeta = const VerificationMeta(
|
|
'cachedAt',
|
|
);
|
|
@override
|
|
late final GeneratedColumn<DateTime> cachedAt = GeneratedColumn<DateTime>(
|
|
'cached_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.dateTime,
|
|
requiredDuringInsert: false,
|
|
defaultValue: currentDateAndTime,
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
url,
|
|
title,
|
|
source,
|
|
etag,
|
|
lastModified,
|
|
cachedAt,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'cached_pages';
|
|
@override
|
|
VerificationContext validateIntegrity(
|
|
Insertable<CachedPage> instance, {
|
|
bool isInserting = false,
|
|
}) {
|
|
final context = VerificationContext();
|
|
final data = instance.toColumns(true);
|
|
if (data.containsKey('url')) {
|
|
context.handle(
|
|
_urlMeta,
|
|
url.isAcceptableOrUnknown(data['url']!, _urlMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_urlMeta);
|
|
}
|
|
if (data.containsKey('title')) {
|
|
context.handle(
|
|
_titleMeta,
|
|
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('source')) {
|
|
context.handle(
|
|
_sourceMeta,
|
|
source.isAcceptableOrUnknown(data['source']!, _sourceMeta),
|
|
);
|
|
} else if (isInserting) {
|
|
context.missing(_sourceMeta);
|
|
}
|
|
if (data.containsKey('etag')) {
|
|
context.handle(
|
|
_etagMeta,
|
|
etag.isAcceptableOrUnknown(data['etag']!, _etagMeta),
|
|
);
|
|
}
|
|
if (data.containsKey('last_modified')) {
|
|
context.handle(
|
|
_lastModifiedMeta,
|
|
lastModified.isAcceptableOrUnknown(
|
|
data['last_modified']!,
|
|
_lastModifiedMeta,
|
|
),
|
|
);
|
|
}
|
|
if (data.containsKey('cached_at')) {
|
|
context.handle(
|
|
_cachedAtMeta,
|
|
cachedAt.isAcceptableOrUnknown(data['cached_at']!, _cachedAtMeta),
|
|
);
|
|
}
|
|
return context;
|
|
}
|
|
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {url};
|
|
@override
|
|
CachedPage map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
|
return CachedPage(
|
|
url: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}url'],
|
|
)!,
|
|
title: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}title'],
|
|
),
|
|
source: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}source'],
|
|
)!,
|
|
etag: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}etag'],
|
|
),
|
|
lastModified: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.string,
|
|
data['${effectivePrefix}last_modified'],
|
|
),
|
|
cachedAt: attachedDatabase.typeMapping.read(
|
|
DriftSqlType.dateTime,
|
|
data['${effectivePrefix}cached_at'],
|
|
)!,
|
|
);
|
|
}
|
|
|
|
@override
|
|
$CachedPagesTable createAlias(String alias) {
|
|
return $CachedPagesTable(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class CachedPage extends DataClass implements Insertable<CachedPage> {
|
|
final String url;
|
|
final String? title;
|
|
final String source;
|
|
final String? etag;
|
|
final String? lastModified;
|
|
final DateTime cachedAt;
|
|
const CachedPage({
|
|
required this.url,
|
|
this.title,
|
|
required this.source,
|
|
this.etag,
|
|
this.lastModified,
|
|
required this.cachedAt,
|
|
});
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
map['url'] = Variable<String>(url);
|
|
if (!nullToAbsent || title != null) {
|
|
map['title'] = Variable<String>(title);
|
|
}
|
|
map['source'] = Variable<String>(source);
|
|
if (!nullToAbsent || etag != null) {
|
|
map['etag'] = Variable<String>(etag);
|
|
}
|
|
if (!nullToAbsent || lastModified != null) {
|
|
map['last_modified'] = Variable<String>(lastModified);
|
|
}
|
|
map['cached_at'] = Variable<DateTime>(cachedAt);
|
|
return map;
|
|
}
|
|
|
|
CachedPagesCompanion toCompanion(bool nullToAbsent) {
|
|
return CachedPagesCompanion(
|
|
url: Value(url),
|
|
title: title == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(title),
|
|
source: Value(source),
|
|
etag: etag == null && nullToAbsent ? const Value.absent() : Value(etag),
|
|
lastModified: lastModified == null && nullToAbsent
|
|
? const Value.absent()
|
|
: Value(lastModified),
|
|
cachedAt: Value(cachedAt),
|
|
);
|
|
}
|
|
|
|
factory CachedPage.fromJson(
|
|
Map<String, dynamic> json, {
|
|
ValueSerializer? serializer,
|
|
}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return CachedPage(
|
|
url: serializer.fromJson<String>(json['url']),
|
|
title: serializer.fromJson<String?>(json['title']),
|
|
source: serializer.fromJson<String>(json['source']),
|
|
etag: serializer.fromJson<String?>(json['etag']),
|
|
lastModified: serializer.fromJson<String?>(json['lastModified']),
|
|
cachedAt: serializer.fromJson<DateTime>(json['cachedAt']),
|
|
);
|
|
}
|
|
@override
|
|
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
|
serializer ??= driftRuntimeOptions.defaultSerializer;
|
|
return <String, dynamic>{
|
|
'url': serializer.toJson<String>(url),
|
|
'title': serializer.toJson<String?>(title),
|
|
'source': serializer.toJson<String>(source),
|
|
'etag': serializer.toJson<String?>(etag),
|
|
'lastModified': serializer.toJson<String?>(lastModified),
|
|
'cachedAt': serializer.toJson<DateTime>(cachedAt),
|
|
};
|
|
}
|
|
|
|
CachedPage copyWith({
|
|
String? url,
|
|
Value<String?> title = const Value.absent(),
|
|
String? source,
|
|
Value<String?> etag = const Value.absent(),
|
|
Value<String?> lastModified = const Value.absent(),
|
|
DateTime? cachedAt,
|
|
}) => CachedPage(
|
|
url: url ?? this.url,
|
|
title: title.present ? title.value : this.title,
|
|
source: source ?? this.source,
|
|
etag: etag.present ? etag.value : this.etag,
|
|
lastModified: lastModified.present ? lastModified.value : this.lastModified,
|
|
cachedAt: cachedAt ?? this.cachedAt,
|
|
);
|
|
CachedPage copyWithCompanion(CachedPagesCompanion data) {
|
|
return CachedPage(
|
|
url: data.url.present ? data.url.value : this.url,
|
|
title: data.title.present ? data.title.value : this.title,
|
|
source: data.source.present ? data.source.value : this.source,
|
|
etag: data.etag.present ? data.etag.value : this.etag,
|
|
lastModified: data.lastModified.present
|
|
? data.lastModified.value
|
|
: this.lastModified,
|
|
cachedAt: data.cachedAt.present ? data.cachedAt.value : this.cachedAt,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('CachedPage(')
|
|
..write('url: $url, ')
|
|
..write('title: $title, ')
|
|
..write('source: $source, ')
|
|
..write('etag: $etag, ')
|
|
..write('lastModified: $lastModified, ')
|
|
..write('cachedAt: $cachedAt')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(url, title, source, etag, lastModified, cachedAt);
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is CachedPage &&
|
|
other.url == this.url &&
|
|
other.title == this.title &&
|
|
other.source == this.source &&
|
|
other.etag == this.etag &&
|
|
other.lastModified == this.lastModified &&
|
|
other.cachedAt == this.cachedAt);
|
|
}
|
|
|
|
class CachedPagesCompanion extends UpdateCompanion<CachedPage> {
|
|
final Value<String> url;
|
|
final Value<String?> title;
|
|
final Value<String> source;
|
|
final Value<String?> etag;
|
|
final Value<String?> lastModified;
|
|
final Value<DateTime> cachedAt;
|
|
final Value<int> rowid;
|
|
const CachedPagesCompanion({
|
|
this.url = const Value.absent(),
|
|
this.title = const Value.absent(),
|
|
this.source = const Value.absent(),
|
|
this.etag = const Value.absent(),
|
|
this.lastModified = const Value.absent(),
|
|
this.cachedAt = const Value.absent(),
|
|
this.rowid = const Value.absent(),
|
|
});
|
|
CachedPagesCompanion.insert({
|
|
required String url,
|
|
this.title = const Value.absent(),
|
|
required String source,
|
|
this.etag = const Value.absent(),
|
|
this.lastModified = const Value.absent(),
|
|
this.cachedAt = const Value.absent(),
|
|
this.rowid = const Value.absent(),
|
|
}) : url = Value(url),
|
|
source = Value(source);
|
|
static Insertable<CachedPage> custom({
|
|
Expression<String>? url,
|
|
Expression<String>? title,
|
|
Expression<String>? source,
|
|
Expression<String>? etag,
|
|
Expression<String>? lastModified,
|
|
Expression<DateTime>? cachedAt,
|
|
Expression<int>? rowid,
|
|
}) {
|
|
return RawValuesInsertable({
|
|
if (url != null) 'url': url,
|
|
if (title != null) 'title': title,
|
|
if (source != null) 'source': source,
|
|
if (etag != null) 'etag': etag,
|
|
if (lastModified != null) 'last_modified': lastModified,
|
|
if (cachedAt != null) 'cached_at': cachedAt,
|
|
if (rowid != null) 'rowid': rowid,
|
|
});
|
|
}
|
|
|
|
CachedPagesCompanion copyWith({
|
|
Value<String>? url,
|
|
Value<String?>? title,
|
|
Value<String>? source,
|
|
Value<String?>? etag,
|
|
Value<String?>? lastModified,
|
|
Value<DateTime>? cachedAt,
|
|
Value<int>? rowid,
|
|
}) {
|
|
return CachedPagesCompanion(
|
|
url: url ?? this.url,
|
|
title: title ?? this.title,
|
|
source: source ?? this.source,
|
|
etag: etag ?? this.etag,
|
|
lastModified: lastModified ?? this.lastModified,
|
|
cachedAt: cachedAt ?? this.cachedAt,
|
|
rowid: rowid ?? this.rowid,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
|
final map = <String, Expression>{};
|
|
if (url.present) {
|
|
map['url'] = Variable<String>(url.value);
|
|
}
|
|
if (title.present) {
|
|
map['title'] = Variable<String>(title.value);
|
|
}
|
|
if (source.present) {
|
|
map['source'] = Variable<String>(source.value);
|
|
}
|
|
if (etag.present) {
|
|
map['etag'] = Variable<String>(etag.value);
|
|
}
|
|
if (lastModified.present) {
|
|
map['last_modified'] = Variable<String>(lastModified.value);
|
|
}
|
|
if (cachedAt.present) {
|
|
map['cached_at'] = Variable<DateTime>(cachedAt.value);
|
|
}
|
|
if (rowid.present) {
|
|
map['rowid'] = Variable<int>(rowid.value);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return (StringBuffer('CachedPagesCompanion(')
|
|
..write('url: $url, ')
|
|
..write('title: $title, ')
|
|
..write('source: $source, ')
|
|
..write('etag: $etag, ')
|
|
..write('lastModified: $lastModified, ')
|
|
..write('cachedAt: $cachedAt, ')
|
|
..write('rowid: $rowid')
|
|
..write(')'))
|
|
.toString();
|
|
}
|
|
}
|
|
|
|
abstract class _$MewsDatabase extends GeneratedDatabase {
|
|
_$MewsDatabase(QueryExecutor e) : super(e);
|
|
$MewsDatabaseManager get managers => $MewsDatabaseManager(this);
|
|
late final $HistoryItemsTable historyItems = $HistoryItemsTable(this);
|
|
late final $BookmarksTable bookmarks = $BookmarksTable(this);
|
|
late final $SubscriptionsTable subscriptions = $SubscriptionsTable(this);
|
|
late final $ReaderSettingsTable readerSettings = $ReaderSettingsTable(this);
|
|
late final $CachedPagesTable cachedPages = $CachedPagesTable(this);
|
|
@override
|
|
Iterable<TableInfo<Table, Object?>> get allTables =>
|
|
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
|
|
@override
|
|
List<DatabaseSchemaEntity> get allSchemaEntities => [
|
|
historyItems,
|
|
bookmarks,
|
|
subscriptions,
|
|
readerSettings,
|
|
cachedPages,
|
|
];
|
|
}
|
|
|
|
typedef $$HistoryItemsTableCreateCompanionBuilder =
|
|
HistoryItemsCompanion Function({
|
|
Value<int> id,
|
|
required String url,
|
|
Value<String?> title,
|
|
Value<DateTime> visitedAt,
|
|
});
|
|
typedef $$HistoryItemsTableUpdateCompanionBuilder =
|
|
HistoryItemsCompanion Function({
|
|
Value<int> id,
|
|
Value<String> url,
|
|
Value<String?> title,
|
|
Value<DateTime> visitedAt,
|
|
});
|
|
|
|
class $$HistoryItemsTableFilterComposer
|
|
extends Composer<_$MewsDatabase, $HistoryItemsTable> {
|
|
$$HistoryItemsTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get url => $composableBuilder(
|
|
column: $table.url,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get title => $composableBuilder(
|
|
column: $table.title,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<DateTime> get visitedAt => $composableBuilder(
|
|
column: $table.visitedAt,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$HistoryItemsTableOrderingComposer
|
|
extends Composer<_$MewsDatabase, $HistoryItemsTable> {
|
|
$$HistoryItemsTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get url => $composableBuilder(
|
|
column: $table.url,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get title => $composableBuilder(
|
|
column: $table.title,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<DateTime> get visitedAt => $composableBuilder(
|
|
column: $table.visitedAt,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$HistoryItemsTableAnnotationComposer
|
|
extends Composer<_$MewsDatabase, $HistoryItemsTable> {
|
|
$$HistoryItemsTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<int> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get url =>
|
|
$composableBuilder(column: $table.url, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get title =>
|
|
$composableBuilder(column: $table.title, builder: (column) => column);
|
|
|
|
GeneratedColumn<DateTime> get visitedAt =>
|
|
$composableBuilder(column: $table.visitedAt, builder: (column) => column);
|
|
}
|
|
|
|
class $$HistoryItemsTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$MewsDatabase,
|
|
$HistoryItemsTable,
|
|
HistoryItem,
|
|
$$HistoryItemsTableFilterComposer,
|
|
$$HistoryItemsTableOrderingComposer,
|
|
$$HistoryItemsTableAnnotationComposer,
|
|
$$HistoryItemsTableCreateCompanionBuilder,
|
|
$$HistoryItemsTableUpdateCompanionBuilder,
|
|
(
|
|
HistoryItem,
|
|
BaseReferences<_$MewsDatabase, $HistoryItemsTable, HistoryItem>,
|
|
),
|
|
HistoryItem,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$HistoryItemsTableTableManager(_$MewsDatabase db, $HistoryItemsTable table)
|
|
: super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer: () =>
|
|
$$HistoryItemsTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer: () =>
|
|
$$HistoryItemsTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer: () =>
|
|
$$HistoryItemsTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
Value<String> url = const Value.absent(),
|
|
Value<String?> title = const Value.absent(),
|
|
Value<DateTime> visitedAt = const Value.absent(),
|
|
}) => HistoryItemsCompanion(
|
|
id: id,
|
|
url: url,
|
|
title: title,
|
|
visitedAt: visitedAt,
|
|
),
|
|
createCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
required String url,
|
|
Value<String?> title = const Value.absent(),
|
|
Value<DateTime> visitedAt = const Value.absent(),
|
|
}) => HistoryItemsCompanion.insert(
|
|
id: id,
|
|
url: url,
|
|
title: title,
|
|
visitedAt: visitedAt,
|
|
),
|
|
withReferenceMapper: (p0) => p0
|
|
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$HistoryItemsTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$MewsDatabase,
|
|
$HistoryItemsTable,
|
|
HistoryItem,
|
|
$$HistoryItemsTableFilterComposer,
|
|
$$HistoryItemsTableOrderingComposer,
|
|
$$HistoryItemsTableAnnotationComposer,
|
|
$$HistoryItemsTableCreateCompanionBuilder,
|
|
$$HistoryItemsTableUpdateCompanionBuilder,
|
|
(
|
|
HistoryItem,
|
|
BaseReferences<_$MewsDatabase, $HistoryItemsTable, HistoryItem>,
|
|
),
|
|
HistoryItem,
|
|
PrefetchHooks Function()
|
|
>;
|
|
typedef $$BookmarksTableCreateCompanionBuilder =
|
|
BookmarksCompanion Function({
|
|
Value<int> id,
|
|
required String url,
|
|
Value<String?> title,
|
|
Value<DateTime> createdAt,
|
|
});
|
|
typedef $$BookmarksTableUpdateCompanionBuilder =
|
|
BookmarksCompanion Function({
|
|
Value<int> id,
|
|
Value<String> url,
|
|
Value<String?> title,
|
|
Value<DateTime> createdAt,
|
|
});
|
|
|
|
class $$BookmarksTableFilterComposer
|
|
extends Composer<_$MewsDatabase, $BookmarksTable> {
|
|
$$BookmarksTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get url => $composableBuilder(
|
|
column: $table.url,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get title => $composableBuilder(
|
|
column: $table.title,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
|
column: $table.createdAt,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$BookmarksTableOrderingComposer
|
|
extends Composer<_$MewsDatabase, $BookmarksTable> {
|
|
$$BookmarksTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get url => $composableBuilder(
|
|
column: $table.url,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get title => $composableBuilder(
|
|
column: $table.title,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
|
column: $table.createdAt,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$BookmarksTableAnnotationComposer
|
|
extends Composer<_$MewsDatabase, $BookmarksTable> {
|
|
$$BookmarksTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<int> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get url =>
|
|
$composableBuilder(column: $table.url, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get title =>
|
|
$composableBuilder(column: $table.title, builder: (column) => column);
|
|
|
|
GeneratedColumn<DateTime> get createdAt =>
|
|
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
|
}
|
|
|
|
class $$BookmarksTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$MewsDatabase,
|
|
$BookmarksTable,
|
|
Bookmark,
|
|
$$BookmarksTableFilterComposer,
|
|
$$BookmarksTableOrderingComposer,
|
|
$$BookmarksTableAnnotationComposer,
|
|
$$BookmarksTableCreateCompanionBuilder,
|
|
$$BookmarksTableUpdateCompanionBuilder,
|
|
(Bookmark, BaseReferences<_$MewsDatabase, $BookmarksTable, Bookmark>),
|
|
Bookmark,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$BookmarksTableTableManager(_$MewsDatabase db, $BookmarksTable table)
|
|
: super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer: () =>
|
|
$$BookmarksTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer: () =>
|
|
$$BookmarksTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer: () =>
|
|
$$BookmarksTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
Value<String> url = const Value.absent(),
|
|
Value<String?> title = const Value.absent(),
|
|
Value<DateTime> createdAt = const Value.absent(),
|
|
}) => BookmarksCompanion(
|
|
id: id,
|
|
url: url,
|
|
title: title,
|
|
createdAt: createdAt,
|
|
),
|
|
createCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
required String url,
|
|
Value<String?> title = const Value.absent(),
|
|
Value<DateTime> createdAt = const Value.absent(),
|
|
}) => BookmarksCompanion.insert(
|
|
id: id,
|
|
url: url,
|
|
title: title,
|
|
createdAt: createdAt,
|
|
),
|
|
withReferenceMapper: (p0) => p0
|
|
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$BookmarksTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$MewsDatabase,
|
|
$BookmarksTable,
|
|
Bookmark,
|
|
$$BookmarksTableFilterComposer,
|
|
$$BookmarksTableOrderingComposer,
|
|
$$BookmarksTableAnnotationComposer,
|
|
$$BookmarksTableCreateCompanionBuilder,
|
|
$$BookmarksTableUpdateCompanionBuilder,
|
|
(Bookmark, BaseReferences<_$MewsDatabase, $BookmarksTable, Bookmark>),
|
|
Bookmark,
|
|
PrefetchHooks Function()
|
|
>;
|
|
typedef $$SubscriptionsTableCreateCompanionBuilder =
|
|
SubscriptionsCompanion Function({
|
|
Value<int> id,
|
|
required String url,
|
|
Value<String?> title,
|
|
Value<String> entryUrls,
|
|
Value<DateTime> createdAt,
|
|
Value<DateTime?> lastCheckedAt,
|
|
});
|
|
typedef $$SubscriptionsTableUpdateCompanionBuilder =
|
|
SubscriptionsCompanion Function({
|
|
Value<int> id,
|
|
Value<String> url,
|
|
Value<String?> title,
|
|
Value<String> entryUrls,
|
|
Value<DateTime> createdAt,
|
|
Value<DateTime?> lastCheckedAt,
|
|
});
|
|
|
|
class $$SubscriptionsTableFilterComposer
|
|
extends Composer<_$MewsDatabase, $SubscriptionsTable> {
|
|
$$SubscriptionsTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get url => $composableBuilder(
|
|
column: $table.url,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get title => $composableBuilder(
|
|
column: $table.title,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get entryUrls => $composableBuilder(
|
|
column: $table.entryUrls,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
|
column: $table.createdAt,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<DateTime> get lastCheckedAt => $composableBuilder(
|
|
column: $table.lastCheckedAt,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$SubscriptionsTableOrderingComposer
|
|
extends Composer<_$MewsDatabase, $SubscriptionsTable> {
|
|
$$SubscriptionsTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get url => $composableBuilder(
|
|
column: $table.url,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get title => $composableBuilder(
|
|
column: $table.title,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get entryUrls => $composableBuilder(
|
|
column: $table.entryUrls,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
|
column: $table.createdAt,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<DateTime> get lastCheckedAt => $composableBuilder(
|
|
column: $table.lastCheckedAt,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$SubscriptionsTableAnnotationComposer
|
|
extends Composer<_$MewsDatabase, $SubscriptionsTable> {
|
|
$$SubscriptionsTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<int> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get url =>
|
|
$composableBuilder(column: $table.url, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get title =>
|
|
$composableBuilder(column: $table.title, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get entryUrls =>
|
|
$composableBuilder(column: $table.entryUrls, builder: (column) => column);
|
|
|
|
GeneratedColumn<DateTime> get createdAt =>
|
|
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
|
|
|
GeneratedColumn<DateTime> get lastCheckedAt => $composableBuilder(
|
|
column: $table.lastCheckedAt,
|
|
builder: (column) => column,
|
|
);
|
|
}
|
|
|
|
class $$SubscriptionsTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$MewsDatabase,
|
|
$SubscriptionsTable,
|
|
Subscription,
|
|
$$SubscriptionsTableFilterComposer,
|
|
$$SubscriptionsTableOrderingComposer,
|
|
$$SubscriptionsTableAnnotationComposer,
|
|
$$SubscriptionsTableCreateCompanionBuilder,
|
|
$$SubscriptionsTableUpdateCompanionBuilder,
|
|
(
|
|
Subscription,
|
|
BaseReferences<_$MewsDatabase, $SubscriptionsTable, Subscription>,
|
|
),
|
|
Subscription,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$SubscriptionsTableTableManager(_$MewsDatabase db, $SubscriptionsTable table)
|
|
: super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer: () =>
|
|
$$SubscriptionsTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer: () =>
|
|
$$SubscriptionsTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer: () =>
|
|
$$SubscriptionsTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
Value<String> url = const Value.absent(),
|
|
Value<String?> title = const Value.absent(),
|
|
Value<String> entryUrls = const Value.absent(),
|
|
Value<DateTime> createdAt = const Value.absent(),
|
|
Value<DateTime?> lastCheckedAt = const Value.absent(),
|
|
}) => SubscriptionsCompanion(
|
|
id: id,
|
|
url: url,
|
|
title: title,
|
|
entryUrls: entryUrls,
|
|
createdAt: createdAt,
|
|
lastCheckedAt: lastCheckedAt,
|
|
),
|
|
createCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
required String url,
|
|
Value<String?> title = const Value.absent(),
|
|
Value<String> entryUrls = const Value.absent(),
|
|
Value<DateTime> createdAt = const Value.absent(),
|
|
Value<DateTime?> lastCheckedAt = const Value.absent(),
|
|
}) => SubscriptionsCompanion.insert(
|
|
id: id,
|
|
url: url,
|
|
title: title,
|
|
entryUrls: entryUrls,
|
|
createdAt: createdAt,
|
|
lastCheckedAt: lastCheckedAt,
|
|
),
|
|
withReferenceMapper: (p0) => p0
|
|
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$SubscriptionsTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$MewsDatabase,
|
|
$SubscriptionsTable,
|
|
Subscription,
|
|
$$SubscriptionsTableFilterComposer,
|
|
$$SubscriptionsTableOrderingComposer,
|
|
$$SubscriptionsTableAnnotationComposer,
|
|
$$SubscriptionsTableCreateCompanionBuilder,
|
|
$$SubscriptionsTableUpdateCompanionBuilder,
|
|
(
|
|
Subscription,
|
|
BaseReferences<_$MewsDatabase, $SubscriptionsTable, Subscription>,
|
|
),
|
|
Subscription,
|
|
PrefetchHooks Function()
|
|
>;
|
|
typedef $$ReaderSettingsTableCreateCompanionBuilder =
|
|
ReaderSettingsCompanion Function({
|
|
Value<int> id,
|
|
Value<String> font,
|
|
Value<double> fontScale,
|
|
Value<String> themeMode,
|
|
Value<String> variant,
|
|
});
|
|
typedef $$ReaderSettingsTableUpdateCompanionBuilder =
|
|
ReaderSettingsCompanion Function({
|
|
Value<int> id,
|
|
Value<String> font,
|
|
Value<double> fontScale,
|
|
Value<String> themeMode,
|
|
Value<String> variant,
|
|
});
|
|
|
|
class $$ReaderSettingsTableFilterComposer
|
|
extends Composer<_$MewsDatabase, $ReaderSettingsTable> {
|
|
$$ReaderSettingsTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get font => $composableBuilder(
|
|
column: $table.font,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<double> get fontScale => $composableBuilder(
|
|
column: $table.fontScale,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get themeMode => $composableBuilder(
|
|
column: $table.themeMode,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get variant => $composableBuilder(
|
|
column: $table.variant,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$ReaderSettingsTableOrderingComposer
|
|
extends Composer<_$MewsDatabase, $ReaderSettingsTable> {
|
|
$$ReaderSettingsTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<int> get id => $composableBuilder(
|
|
column: $table.id,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get font => $composableBuilder(
|
|
column: $table.font,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<double> get fontScale => $composableBuilder(
|
|
column: $table.fontScale,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get themeMode => $composableBuilder(
|
|
column: $table.themeMode,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get variant => $composableBuilder(
|
|
column: $table.variant,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$ReaderSettingsTableAnnotationComposer
|
|
extends Composer<_$MewsDatabase, $ReaderSettingsTable> {
|
|
$$ReaderSettingsTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<int> get id =>
|
|
$composableBuilder(column: $table.id, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get font =>
|
|
$composableBuilder(column: $table.font, builder: (column) => column);
|
|
|
|
GeneratedColumn<double> get fontScale =>
|
|
$composableBuilder(column: $table.fontScale, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get themeMode =>
|
|
$composableBuilder(column: $table.themeMode, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get variant =>
|
|
$composableBuilder(column: $table.variant, builder: (column) => column);
|
|
}
|
|
|
|
class $$ReaderSettingsTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$MewsDatabase,
|
|
$ReaderSettingsTable,
|
|
ReaderSetting,
|
|
$$ReaderSettingsTableFilterComposer,
|
|
$$ReaderSettingsTableOrderingComposer,
|
|
$$ReaderSettingsTableAnnotationComposer,
|
|
$$ReaderSettingsTableCreateCompanionBuilder,
|
|
$$ReaderSettingsTableUpdateCompanionBuilder,
|
|
(
|
|
ReaderSetting,
|
|
BaseReferences<_$MewsDatabase, $ReaderSettingsTable, ReaderSetting>,
|
|
),
|
|
ReaderSetting,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$ReaderSettingsTableTableManager(
|
|
_$MewsDatabase db,
|
|
$ReaderSettingsTable table,
|
|
) : super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer: () =>
|
|
$$ReaderSettingsTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer: () =>
|
|
$$ReaderSettingsTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer: () =>
|
|
$$ReaderSettingsTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
Value<String> font = const Value.absent(),
|
|
Value<double> fontScale = const Value.absent(),
|
|
Value<String> themeMode = const Value.absent(),
|
|
Value<String> variant = const Value.absent(),
|
|
}) => ReaderSettingsCompanion(
|
|
id: id,
|
|
font: font,
|
|
fontScale: fontScale,
|
|
themeMode: themeMode,
|
|
variant: variant,
|
|
),
|
|
createCompanionCallback:
|
|
({
|
|
Value<int> id = const Value.absent(),
|
|
Value<String> font = const Value.absent(),
|
|
Value<double> fontScale = const Value.absent(),
|
|
Value<String> themeMode = const Value.absent(),
|
|
Value<String> variant = const Value.absent(),
|
|
}) => ReaderSettingsCompanion.insert(
|
|
id: id,
|
|
font: font,
|
|
fontScale: fontScale,
|
|
themeMode: themeMode,
|
|
variant: variant,
|
|
),
|
|
withReferenceMapper: (p0) => p0
|
|
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$ReaderSettingsTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$MewsDatabase,
|
|
$ReaderSettingsTable,
|
|
ReaderSetting,
|
|
$$ReaderSettingsTableFilterComposer,
|
|
$$ReaderSettingsTableOrderingComposer,
|
|
$$ReaderSettingsTableAnnotationComposer,
|
|
$$ReaderSettingsTableCreateCompanionBuilder,
|
|
$$ReaderSettingsTableUpdateCompanionBuilder,
|
|
(
|
|
ReaderSetting,
|
|
BaseReferences<_$MewsDatabase, $ReaderSettingsTable, ReaderSetting>,
|
|
),
|
|
ReaderSetting,
|
|
PrefetchHooks Function()
|
|
>;
|
|
typedef $$CachedPagesTableCreateCompanionBuilder =
|
|
CachedPagesCompanion Function({
|
|
required String url,
|
|
Value<String?> title,
|
|
required String source,
|
|
Value<String?> etag,
|
|
Value<String?> lastModified,
|
|
Value<DateTime> cachedAt,
|
|
Value<int> rowid,
|
|
});
|
|
typedef $$CachedPagesTableUpdateCompanionBuilder =
|
|
CachedPagesCompanion Function({
|
|
Value<String> url,
|
|
Value<String?> title,
|
|
Value<String> source,
|
|
Value<String?> etag,
|
|
Value<String?> lastModified,
|
|
Value<DateTime> cachedAt,
|
|
Value<int> rowid,
|
|
});
|
|
|
|
class $$CachedPagesTableFilterComposer
|
|
extends Composer<_$MewsDatabase, $CachedPagesTable> {
|
|
$$CachedPagesTableFilterComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnFilters<String> get url => $composableBuilder(
|
|
column: $table.url,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get title => $composableBuilder(
|
|
column: $table.title,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get source => $composableBuilder(
|
|
column: $table.source,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get etag => $composableBuilder(
|
|
column: $table.etag,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<String> get lastModified => $composableBuilder(
|
|
column: $table.lastModified,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
|
|
ColumnFilters<DateTime> get cachedAt => $composableBuilder(
|
|
column: $table.cachedAt,
|
|
builder: (column) => ColumnFilters(column),
|
|
);
|
|
}
|
|
|
|
class $$CachedPagesTableOrderingComposer
|
|
extends Composer<_$MewsDatabase, $CachedPagesTable> {
|
|
$$CachedPagesTableOrderingComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
ColumnOrderings<String> get url => $composableBuilder(
|
|
column: $table.url,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get title => $composableBuilder(
|
|
column: $table.title,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get source => $composableBuilder(
|
|
column: $table.source,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get etag => $composableBuilder(
|
|
column: $table.etag,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<String> get lastModified => $composableBuilder(
|
|
column: $table.lastModified,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
|
|
ColumnOrderings<DateTime> get cachedAt => $composableBuilder(
|
|
column: $table.cachedAt,
|
|
builder: (column) => ColumnOrderings(column),
|
|
);
|
|
}
|
|
|
|
class $$CachedPagesTableAnnotationComposer
|
|
extends Composer<_$MewsDatabase, $CachedPagesTable> {
|
|
$$CachedPagesTableAnnotationComposer({
|
|
required super.$db,
|
|
required super.$table,
|
|
super.joinBuilder,
|
|
super.$addJoinBuilderToRootComposer,
|
|
super.$removeJoinBuilderFromRootComposer,
|
|
});
|
|
GeneratedColumn<String> get url =>
|
|
$composableBuilder(column: $table.url, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get title =>
|
|
$composableBuilder(column: $table.title, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get source =>
|
|
$composableBuilder(column: $table.source, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get etag =>
|
|
$composableBuilder(column: $table.etag, builder: (column) => column);
|
|
|
|
GeneratedColumn<String> get lastModified => $composableBuilder(
|
|
column: $table.lastModified,
|
|
builder: (column) => column,
|
|
);
|
|
|
|
GeneratedColumn<DateTime> get cachedAt =>
|
|
$composableBuilder(column: $table.cachedAt, builder: (column) => column);
|
|
}
|
|
|
|
class $$CachedPagesTableTableManager
|
|
extends
|
|
RootTableManager<
|
|
_$MewsDatabase,
|
|
$CachedPagesTable,
|
|
CachedPage,
|
|
$$CachedPagesTableFilterComposer,
|
|
$$CachedPagesTableOrderingComposer,
|
|
$$CachedPagesTableAnnotationComposer,
|
|
$$CachedPagesTableCreateCompanionBuilder,
|
|
$$CachedPagesTableUpdateCompanionBuilder,
|
|
(
|
|
CachedPage,
|
|
BaseReferences<_$MewsDatabase, $CachedPagesTable, CachedPage>,
|
|
),
|
|
CachedPage,
|
|
PrefetchHooks Function()
|
|
> {
|
|
$$CachedPagesTableTableManager(_$MewsDatabase db, $CachedPagesTable table)
|
|
: super(
|
|
TableManagerState(
|
|
db: db,
|
|
table: table,
|
|
createFilteringComposer: () =>
|
|
$$CachedPagesTableFilterComposer($db: db, $table: table),
|
|
createOrderingComposer: () =>
|
|
$$CachedPagesTableOrderingComposer($db: db, $table: table),
|
|
createComputedFieldComposer: () =>
|
|
$$CachedPagesTableAnnotationComposer($db: db, $table: table),
|
|
updateCompanionCallback:
|
|
({
|
|
Value<String> url = const Value.absent(),
|
|
Value<String?> title = const Value.absent(),
|
|
Value<String> source = const Value.absent(),
|
|
Value<String?> etag = const Value.absent(),
|
|
Value<String?> lastModified = const Value.absent(),
|
|
Value<DateTime> cachedAt = const Value.absent(),
|
|
Value<int> rowid = const Value.absent(),
|
|
}) => CachedPagesCompanion(
|
|
url: url,
|
|
title: title,
|
|
source: source,
|
|
etag: etag,
|
|
lastModified: lastModified,
|
|
cachedAt: cachedAt,
|
|
rowid: rowid,
|
|
),
|
|
createCompanionCallback:
|
|
({
|
|
required String url,
|
|
Value<String?> title = const Value.absent(),
|
|
required String source,
|
|
Value<String?> etag = const Value.absent(),
|
|
Value<String?> lastModified = const Value.absent(),
|
|
Value<DateTime> cachedAt = const Value.absent(),
|
|
Value<int> rowid = const Value.absent(),
|
|
}) => CachedPagesCompanion.insert(
|
|
url: url,
|
|
title: title,
|
|
source: source,
|
|
etag: etag,
|
|
lastModified: lastModified,
|
|
cachedAt: cachedAt,
|
|
rowid: rowid,
|
|
),
|
|
withReferenceMapper: (p0) => p0
|
|
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
|
.toList(),
|
|
prefetchHooksCallback: null,
|
|
),
|
|
);
|
|
}
|
|
|
|
typedef $$CachedPagesTableProcessedTableManager =
|
|
ProcessedTableManager<
|
|
_$MewsDatabase,
|
|
$CachedPagesTable,
|
|
CachedPage,
|
|
$$CachedPagesTableFilterComposer,
|
|
$$CachedPagesTableOrderingComposer,
|
|
$$CachedPagesTableAnnotationComposer,
|
|
$$CachedPagesTableCreateCompanionBuilder,
|
|
$$CachedPagesTableUpdateCompanionBuilder,
|
|
(
|
|
CachedPage,
|
|
BaseReferences<_$MewsDatabase, $CachedPagesTable, CachedPage>,
|
|
),
|
|
CachedPage,
|
|
PrefetchHooks Function()
|
|
>;
|
|
|
|
class $MewsDatabaseManager {
|
|
final _$MewsDatabase _db;
|
|
$MewsDatabaseManager(this._db);
|
|
$$HistoryItemsTableTableManager get historyItems =>
|
|
$$HistoryItemsTableTableManager(_db, _db.historyItems);
|
|
$$BookmarksTableTableManager get bookmarks =>
|
|
$$BookmarksTableTableManager(_db, _db.bookmarks);
|
|
$$SubscriptionsTableTableManager get subscriptions =>
|
|
$$SubscriptionsTableTableManager(_db, _db.subscriptions);
|
|
$$ReaderSettingsTableTableManager get readerSettings =>
|
|
$$ReaderSettingsTableTableManager(_db, _db.readerSettings);
|
|
$$CachedPagesTableTableManager get cachedPages =>
|
|
$$CachedPagesTableTableManager(_db, _db.cachedPages);
|
|
}
|