This repository has been archived on 2026-06-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
FabledApp/lib/data/local/database.g.dart
T
bvandeusen 7df7b5ff85 feat(offline): tier 2 phase 3 — write queue with optimistic UI
Offline writes now queue + apply optimistically instead of throwing.
On reconnect, the queue drains automatically; conflicts and rejections
surface as one-time SnackBars so the user knows their edit didn't land.

- Drift schema v3: `pending_writes` table (verb + payload + baseline +
  tries + last_error). Negative ids serve as cache placeholders for
  offline-created rows until replay assigns the server id.
- Each write repository (notes, tasks, projects, milestones, events)
  now catches NetworkException, applies the change to cache (with a
  fresh `nextTempId()` for creates), and enqueues the API call.
- Edits to a still-queued offline-created row coalesce into the
  original create payload — only one server call per row, in order.
- Deletes of still-queued offline-created rows drop the queue entry
  and the cache row; no server call ever happens.
- New WriteQueue service drains the queue oldest-first.
  Server-wins on `updated_at` baseline check (notes/tasks/projects);
  last-writer-wins for milestones/events (no getOne available).
  4xx → drop + surface as `rejected`; conflict → drop + `overwritten`;
  404 on update → drop + `missing`; 5xx/network → keep + retry next
  online cycle.
- Replay fires on AuthStatus → authenticated transitions
  (cold-start, came-back-online, login).
- OfflineBanner shows "Retry (N)" with the pending-writes count.
- Distinct ServerException added so 4xx no longer masquerade as
  NetworkException — the queue can drop them instead of looping.

flutter analyze clean; 21 tests pass (3 new for QueueFailure messaging).
Phase 4 (read-only UI indicators on cached/temp rows) still ahead.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 22:08:40 -04:00

6754 lines
212 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'database.dart';
// ignore_for_file: type=lint
class $CachedNotesTable extends CachedNotes
with TableInfo<$CachedNotesTable, CachedNote> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$CachedNotesTable(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,
);
static const VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
'title',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _bodyMeta = const VerificationMeta('body');
@override
late final GeneratedColumn<String> body = GeneratedColumn<String>(
'body',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _tagsJsonMeta = const VerificationMeta(
'tagsJson',
);
@override
late final GeneratedColumn<String> tagsJson = GeneratedColumn<String>(
'tags_json',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultValue: const Constant('[]'),
);
static const VerificationMeta _noteTypeMeta = const VerificationMeta(
'noteType',
);
@override
late final GeneratedColumn<String> noteType = GeneratedColumn<String>(
'note_type',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultValue: const Constant('note'),
);
static const VerificationMeta _projectIdMeta = const VerificationMeta(
'projectId',
);
@override
late final GeneratedColumn<int> projectId = GeneratedColumn<int>(
'project_id',
aliasedName,
true,
type: DriftSqlType.int,
requiredDuringInsert: false,
);
static const VerificationMeta _milestoneIdMeta = const VerificationMeta(
'milestoneId',
);
@override
late final GeneratedColumn<int> milestoneId = GeneratedColumn<int>(
'milestone_id',
aliasedName,
true,
type: DriftSqlType.int,
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: true,
);
static const VerificationMeta _updatedAtMeta = const VerificationMeta(
'updatedAt',
);
@override
late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(
'updated_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _cachedAtMeta = const VerificationMeta(
'cachedAt',
);
@override
late final GeneratedColumn<DateTime> cachedAt = GeneratedColumn<DateTime>(
'cached_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
clientDefault: () => DateTime.now(),
);
@override
List<GeneratedColumn> get $columns => [
id,
title,
body,
tagsJson,
noteType,
projectId,
milestoneId,
createdAt,
updatedAt,
cachedAt,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'cached_notes';
@override
VerificationContext validateIntegrity(
Insertable<CachedNote> 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('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('tags_json')) {
context.handle(
_tagsJsonMeta,
tagsJson.isAcceptableOrUnknown(data['tags_json']!, _tagsJsonMeta),
);
}
if (data.containsKey('note_type')) {
context.handle(
_noteTypeMeta,
noteType.isAcceptableOrUnknown(data['note_type']!, _noteTypeMeta),
);
}
if (data.containsKey('project_id')) {
context.handle(
_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta),
);
}
if (data.containsKey('milestone_id')) {
context.handle(
_milestoneIdMeta,
milestoneId.isAcceptableOrUnknown(
data['milestone_id']!,
_milestoneIdMeta,
),
);
}
if (data.containsKey('created_at')) {
context.handle(
_createdAtMeta,
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
);
} else if (isInserting) {
context.missing(_createdAtMeta);
}
if (data.containsKey('updated_at')) {
context.handle(
_updatedAtMeta,
updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta),
);
} else if (isInserting) {
context.missing(_updatedAtMeta);
}
if (data.containsKey('cached_at')) {
context.handle(
_cachedAtMeta,
cachedAt.isAcceptableOrUnknown(data['cached_at']!, _cachedAtMeta),
);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
CachedNote map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return CachedNote(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
title: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}title'],
)!,
body: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}body'],
)!,
tagsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}tags_json'],
)!,
noteType: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}note_type'],
)!,
projectId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}project_id'],
),
milestoneId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}milestone_id'],
),
createdAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}created_at'],
)!,
updatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}updated_at'],
)!,
cachedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}cached_at'],
)!,
);
}
@override
$CachedNotesTable createAlias(String alias) {
return $CachedNotesTable(attachedDatabase, alias);
}
}
class CachedNote extends DataClass implements Insertable<CachedNote> {
final int id;
final String title;
final String body;
final String tagsJson;
final String noteType;
final int? projectId;
final int? milestoneId;
final DateTime createdAt;
final DateTime updatedAt;
final DateTime cachedAt;
const CachedNote({
required this.id,
required this.title,
required this.body,
required this.tagsJson,
required this.noteType,
this.projectId,
this.milestoneId,
required this.createdAt,
required this.updatedAt,
required this.cachedAt,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['title'] = Variable<String>(title);
map['body'] = Variable<String>(body);
map['tags_json'] = Variable<String>(tagsJson);
map['note_type'] = Variable<String>(noteType);
if (!nullToAbsent || projectId != null) {
map['project_id'] = Variable<int>(projectId);
}
if (!nullToAbsent || milestoneId != null) {
map['milestone_id'] = Variable<int>(milestoneId);
}
map['created_at'] = Variable<DateTime>(createdAt);
map['updated_at'] = Variable<DateTime>(updatedAt);
map['cached_at'] = Variable<DateTime>(cachedAt);
return map;
}
CachedNotesCompanion toCompanion(bool nullToAbsent) {
return CachedNotesCompanion(
id: Value(id),
title: Value(title),
body: Value(body),
tagsJson: Value(tagsJson),
noteType: Value(noteType),
projectId: projectId == null && nullToAbsent
? const Value.absent()
: Value(projectId),
milestoneId: milestoneId == null && nullToAbsent
? const Value.absent()
: Value(milestoneId),
createdAt: Value(createdAt),
updatedAt: Value(updatedAt),
cachedAt: Value(cachedAt),
);
}
factory CachedNote.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return CachedNote(
id: serializer.fromJson<int>(json['id']),
title: serializer.fromJson<String>(json['title']),
body: serializer.fromJson<String>(json['body']),
tagsJson: serializer.fromJson<String>(json['tagsJson']),
noteType: serializer.fromJson<String>(json['noteType']),
projectId: serializer.fromJson<int?>(json['projectId']),
milestoneId: serializer.fromJson<int?>(json['milestoneId']),
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
cachedAt: serializer.fromJson<DateTime>(json['cachedAt']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'title': serializer.toJson<String>(title),
'body': serializer.toJson<String>(body),
'tagsJson': serializer.toJson<String>(tagsJson),
'noteType': serializer.toJson<String>(noteType),
'projectId': serializer.toJson<int?>(projectId),
'milestoneId': serializer.toJson<int?>(milestoneId),
'createdAt': serializer.toJson<DateTime>(createdAt),
'updatedAt': serializer.toJson<DateTime>(updatedAt),
'cachedAt': serializer.toJson<DateTime>(cachedAt),
};
}
CachedNote copyWith({
int? id,
String? title,
String? body,
String? tagsJson,
String? noteType,
Value<int?> projectId = const Value.absent(),
Value<int?> milestoneId = const Value.absent(),
DateTime? createdAt,
DateTime? updatedAt,
DateTime? cachedAt,
}) => CachedNote(
id: id ?? this.id,
title: title ?? this.title,
body: body ?? this.body,
tagsJson: tagsJson ?? this.tagsJson,
noteType: noteType ?? this.noteType,
projectId: projectId.present ? projectId.value : this.projectId,
milestoneId: milestoneId.present ? milestoneId.value : this.milestoneId,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
CachedNote copyWithCompanion(CachedNotesCompanion data) {
return CachedNote(
id: data.id.present ? data.id.value : this.id,
title: data.title.present ? data.title.value : this.title,
body: data.body.present ? data.body.value : this.body,
tagsJson: data.tagsJson.present ? data.tagsJson.value : this.tagsJson,
noteType: data.noteType.present ? data.noteType.value : this.noteType,
projectId: data.projectId.present ? data.projectId.value : this.projectId,
milestoneId: data.milestoneId.present
? data.milestoneId.value
: this.milestoneId,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
cachedAt: data.cachedAt.present ? data.cachedAt.value : this.cachedAt,
);
}
@override
String toString() {
return (StringBuffer('CachedNote(')
..write('id: $id, ')
..write('title: $title, ')
..write('body: $body, ')
..write('tagsJson: $tagsJson, ')
..write('noteType: $noteType, ')
..write('projectId: $projectId, ')
..write('milestoneId: $milestoneId, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
title,
body,
tagsJson,
noteType,
projectId,
milestoneId,
createdAt,
updatedAt,
cachedAt,
);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is CachedNote &&
other.id == this.id &&
other.title == this.title &&
other.body == this.body &&
other.tagsJson == this.tagsJson &&
other.noteType == this.noteType &&
other.projectId == this.projectId &&
other.milestoneId == this.milestoneId &&
other.createdAt == this.createdAt &&
other.updatedAt == this.updatedAt &&
other.cachedAt == this.cachedAt);
}
class CachedNotesCompanion extends UpdateCompanion<CachedNote> {
final Value<int> id;
final Value<String> title;
final Value<String> body;
final Value<String> tagsJson;
final Value<String> noteType;
final Value<int?> projectId;
final Value<int?> milestoneId;
final Value<DateTime> createdAt;
final Value<DateTime> updatedAt;
final Value<DateTime> cachedAt;
const CachedNotesCompanion({
this.id = const Value.absent(),
this.title = const Value.absent(),
this.body = const Value.absent(),
this.tagsJson = const Value.absent(),
this.noteType = const Value.absent(),
this.projectId = const Value.absent(),
this.milestoneId = const Value.absent(),
this.createdAt = const Value.absent(),
this.updatedAt = const Value.absent(),
this.cachedAt = const Value.absent(),
});
CachedNotesCompanion.insert({
this.id = const Value.absent(),
required String title,
required String body,
this.tagsJson = const Value.absent(),
this.noteType = const Value.absent(),
this.projectId = const Value.absent(),
this.milestoneId = const Value.absent(),
required DateTime createdAt,
required DateTime updatedAt,
this.cachedAt = const Value.absent(),
}) : title = Value(title),
body = Value(body),
createdAt = Value(createdAt),
updatedAt = Value(updatedAt);
static Insertable<CachedNote> custom({
Expression<int>? id,
Expression<String>? title,
Expression<String>? body,
Expression<String>? tagsJson,
Expression<String>? noteType,
Expression<int>? projectId,
Expression<int>? milestoneId,
Expression<DateTime>? createdAt,
Expression<DateTime>? updatedAt,
Expression<DateTime>? cachedAt,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (title != null) 'title': title,
if (body != null) 'body': body,
if (tagsJson != null) 'tags_json': tagsJson,
if (noteType != null) 'note_type': noteType,
if (projectId != null) 'project_id': projectId,
if (milestoneId != null) 'milestone_id': milestoneId,
if (createdAt != null) 'created_at': createdAt,
if (updatedAt != null) 'updated_at': updatedAt,
if (cachedAt != null) 'cached_at': cachedAt,
});
}
CachedNotesCompanion copyWith({
Value<int>? id,
Value<String>? title,
Value<String>? body,
Value<String>? tagsJson,
Value<String>? noteType,
Value<int?>? projectId,
Value<int?>? milestoneId,
Value<DateTime>? createdAt,
Value<DateTime>? updatedAt,
Value<DateTime>? cachedAt,
}) {
return CachedNotesCompanion(
id: id ?? this.id,
title: title ?? this.title,
body: body ?? this.body,
tagsJson: tagsJson ?? this.tagsJson,
noteType: noteType ?? this.noteType,
projectId: projectId ?? this.projectId,
milestoneId: milestoneId ?? this.milestoneId,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (title.present) {
map['title'] = Variable<String>(title.value);
}
if (body.present) {
map['body'] = Variable<String>(body.value);
}
if (tagsJson.present) {
map['tags_json'] = Variable<String>(tagsJson.value);
}
if (noteType.present) {
map['note_type'] = Variable<String>(noteType.value);
}
if (projectId.present) {
map['project_id'] = Variable<int>(projectId.value);
}
if (milestoneId.present) {
map['milestone_id'] = Variable<int>(milestoneId.value);
}
if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value);
}
if (updatedAt.present) {
map['updated_at'] = Variable<DateTime>(updatedAt.value);
}
if (cachedAt.present) {
map['cached_at'] = Variable<DateTime>(cachedAt.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('CachedNotesCompanion(')
..write('id: $id, ')
..write('title: $title, ')
..write('body: $body, ')
..write('tagsJson: $tagsJson, ')
..write('noteType: $noteType, ')
..write('projectId: $projectId, ')
..write('milestoneId: $milestoneId, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
}
class $CachedTasksTable extends CachedTasks
with TableInfo<$CachedTasksTable, CachedTask> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$CachedTasksTable(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,
);
static const VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
'title',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _descriptionMeta = const VerificationMeta(
'description',
);
@override
late final GeneratedColumn<String> description = GeneratedColumn<String>(
'description',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
static const VerificationMeta _statusMeta = const VerificationMeta('status');
@override
late final GeneratedColumn<String> status = GeneratedColumn<String>(
'status',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _priorityMeta = const VerificationMeta(
'priority',
);
@override
late final GeneratedColumn<String> priority = GeneratedColumn<String>(
'priority',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _dueDateMeta = const VerificationMeta(
'dueDate',
);
@override
late final GeneratedColumn<DateTime> dueDate = GeneratedColumn<DateTime>(
'due_date',
aliasedName,
true,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
);
static const VerificationMeta _projectIdMeta = const VerificationMeta(
'projectId',
);
@override
late final GeneratedColumn<int> projectId = GeneratedColumn<int>(
'project_id',
aliasedName,
true,
type: DriftSqlType.int,
requiredDuringInsert: false,
);
static const VerificationMeta _milestoneIdMeta = const VerificationMeta(
'milestoneId',
);
@override
late final GeneratedColumn<int> milestoneId = GeneratedColumn<int>(
'milestone_id',
aliasedName,
true,
type: DriftSqlType.int,
requiredDuringInsert: false,
);
static const VerificationMeta _parentIdMeta = const VerificationMeta(
'parentId',
);
@override
late final GeneratedColumn<int> parentId = GeneratedColumn<int>(
'parent_id',
aliasedName,
true,
type: DriftSqlType.int,
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: true,
);
static const VerificationMeta _updatedAtMeta = const VerificationMeta(
'updatedAt',
);
@override
late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(
'updated_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _cachedAtMeta = const VerificationMeta(
'cachedAt',
);
@override
late final GeneratedColumn<DateTime> cachedAt = GeneratedColumn<DateTime>(
'cached_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
clientDefault: () => DateTime.now(),
);
@override
List<GeneratedColumn> get $columns => [
id,
title,
description,
status,
priority,
dueDate,
projectId,
milestoneId,
parentId,
createdAt,
updatedAt,
cachedAt,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'cached_tasks';
@override
VerificationContext validateIntegrity(
Insertable<CachedTask> 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('title')) {
context.handle(
_titleMeta,
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
);
} else if (isInserting) {
context.missing(_titleMeta);
}
if (data.containsKey('description')) {
context.handle(
_descriptionMeta,
description.isAcceptableOrUnknown(
data['description']!,
_descriptionMeta,
),
);
}
if (data.containsKey('status')) {
context.handle(
_statusMeta,
status.isAcceptableOrUnknown(data['status']!, _statusMeta),
);
} else if (isInserting) {
context.missing(_statusMeta);
}
if (data.containsKey('priority')) {
context.handle(
_priorityMeta,
priority.isAcceptableOrUnknown(data['priority']!, _priorityMeta),
);
} else if (isInserting) {
context.missing(_priorityMeta);
}
if (data.containsKey('due_date')) {
context.handle(
_dueDateMeta,
dueDate.isAcceptableOrUnknown(data['due_date']!, _dueDateMeta),
);
}
if (data.containsKey('project_id')) {
context.handle(
_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta),
);
}
if (data.containsKey('milestone_id')) {
context.handle(
_milestoneIdMeta,
milestoneId.isAcceptableOrUnknown(
data['milestone_id']!,
_milestoneIdMeta,
),
);
}
if (data.containsKey('parent_id')) {
context.handle(
_parentIdMeta,
parentId.isAcceptableOrUnknown(data['parent_id']!, _parentIdMeta),
);
}
if (data.containsKey('created_at')) {
context.handle(
_createdAtMeta,
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
);
} else if (isInserting) {
context.missing(_createdAtMeta);
}
if (data.containsKey('updated_at')) {
context.handle(
_updatedAtMeta,
updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta),
);
} else if (isInserting) {
context.missing(_updatedAtMeta);
}
if (data.containsKey('cached_at')) {
context.handle(
_cachedAtMeta,
cachedAt.isAcceptableOrUnknown(data['cached_at']!, _cachedAtMeta),
);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
CachedTask map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return CachedTask(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
title: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}title'],
)!,
description: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}description'],
),
status: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}status'],
)!,
priority: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}priority'],
)!,
dueDate: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}due_date'],
),
projectId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}project_id'],
),
milestoneId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}milestone_id'],
),
parentId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}parent_id'],
),
createdAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}created_at'],
)!,
updatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}updated_at'],
)!,
cachedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}cached_at'],
)!,
);
}
@override
$CachedTasksTable createAlias(String alias) {
return $CachedTasksTable(attachedDatabase, alias);
}
}
class CachedTask extends DataClass implements Insertable<CachedTask> {
final int id;
final String title;
final String? description;
final String status;
final String priority;
final DateTime? dueDate;
final int? projectId;
final int? milestoneId;
final int? parentId;
final DateTime createdAt;
final DateTime updatedAt;
final DateTime cachedAt;
const CachedTask({
required this.id,
required this.title,
this.description,
required this.status,
required this.priority,
this.dueDate,
this.projectId,
this.milestoneId,
this.parentId,
required this.createdAt,
required this.updatedAt,
required this.cachedAt,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['title'] = Variable<String>(title);
if (!nullToAbsent || description != null) {
map['description'] = Variable<String>(description);
}
map['status'] = Variable<String>(status);
map['priority'] = Variable<String>(priority);
if (!nullToAbsent || dueDate != null) {
map['due_date'] = Variable<DateTime>(dueDate);
}
if (!nullToAbsent || projectId != null) {
map['project_id'] = Variable<int>(projectId);
}
if (!nullToAbsent || milestoneId != null) {
map['milestone_id'] = Variable<int>(milestoneId);
}
if (!nullToAbsent || parentId != null) {
map['parent_id'] = Variable<int>(parentId);
}
map['created_at'] = Variable<DateTime>(createdAt);
map['updated_at'] = Variable<DateTime>(updatedAt);
map['cached_at'] = Variable<DateTime>(cachedAt);
return map;
}
CachedTasksCompanion toCompanion(bool nullToAbsent) {
return CachedTasksCompanion(
id: Value(id),
title: Value(title),
description: description == null && nullToAbsent
? const Value.absent()
: Value(description),
status: Value(status),
priority: Value(priority),
dueDate: dueDate == null && nullToAbsent
? const Value.absent()
: Value(dueDate),
projectId: projectId == null && nullToAbsent
? const Value.absent()
: Value(projectId),
milestoneId: milestoneId == null && nullToAbsent
? const Value.absent()
: Value(milestoneId),
parentId: parentId == null && nullToAbsent
? const Value.absent()
: Value(parentId),
createdAt: Value(createdAt),
updatedAt: Value(updatedAt),
cachedAt: Value(cachedAt),
);
}
factory CachedTask.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return CachedTask(
id: serializer.fromJson<int>(json['id']),
title: serializer.fromJson<String>(json['title']),
description: serializer.fromJson<String?>(json['description']),
status: serializer.fromJson<String>(json['status']),
priority: serializer.fromJson<String>(json['priority']),
dueDate: serializer.fromJson<DateTime?>(json['dueDate']),
projectId: serializer.fromJson<int?>(json['projectId']),
milestoneId: serializer.fromJson<int?>(json['milestoneId']),
parentId: serializer.fromJson<int?>(json['parentId']),
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
cachedAt: serializer.fromJson<DateTime>(json['cachedAt']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'title': serializer.toJson<String>(title),
'description': serializer.toJson<String?>(description),
'status': serializer.toJson<String>(status),
'priority': serializer.toJson<String>(priority),
'dueDate': serializer.toJson<DateTime?>(dueDate),
'projectId': serializer.toJson<int?>(projectId),
'milestoneId': serializer.toJson<int?>(milestoneId),
'parentId': serializer.toJson<int?>(parentId),
'createdAt': serializer.toJson<DateTime>(createdAt),
'updatedAt': serializer.toJson<DateTime>(updatedAt),
'cachedAt': serializer.toJson<DateTime>(cachedAt),
};
}
CachedTask copyWith({
int? id,
String? title,
Value<String?> description = const Value.absent(),
String? status,
String? priority,
Value<DateTime?> dueDate = const Value.absent(),
Value<int?> projectId = const Value.absent(),
Value<int?> milestoneId = const Value.absent(),
Value<int?> parentId = const Value.absent(),
DateTime? createdAt,
DateTime? updatedAt,
DateTime? cachedAt,
}) => CachedTask(
id: id ?? this.id,
title: title ?? this.title,
description: description.present ? description.value : this.description,
status: status ?? this.status,
priority: priority ?? this.priority,
dueDate: dueDate.present ? dueDate.value : this.dueDate,
projectId: projectId.present ? projectId.value : this.projectId,
milestoneId: milestoneId.present ? milestoneId.value : this.milestoneId,
parentId: parentId.present ? parentId.value : this.parentId,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
CachedTask copyWithCompanion(CachedTasksCompanion data) {
return CachedTask(
id: data.id.present ? data.id.value : this.id,
title: data.title.present ? data.title.value : this.title,
description: data.description.present
? data.description.value
: this.description,
status: data.status.present ? data.status.value : this.status,
priority: data.priority.present ? data.priority.value : this.priority,
dueDate: data.dueDate.present ? data.dueDate.value : this.dueDate,
projectId: data.projectId.present ? data.projectId.value : this.projectId,
milestoneId: data.milestoneId.present
? data.milestoneId.value
: this.milestoneId,
parentId: data.parentId.present ? data.parentId.value : this.parentId,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
cachedAt: data.cachedAt.present ? data.cachedAt.value : this.cachedAt,
);
}
@override
String toString() {
return (StringBuffer('CachedTask(')
..write('id: $id, ')
..write('title: $title, ')
..write('description: $description, ')
..write('status: $status, ')
..write('priority: $priority, ')
..write('dueDate: $dueDate, ')
..write('projectId: $projectId, ')
..write('milestoneId: $milestoneId, ')
..write('parentId: $parentId, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
title,
description,
status,
priority,
dueDate,
projectId,
milestoneId,
parentId,
createdAt,
updatedAt,
cachedAt,
);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is CachedTask &&
other.id == this.id &&
other.title == this.title &&
other.description == this.description &&
other.status == this.status &&
other.priority == this.priority &&
other.dueDate == this.dueDate &&
other.projectId == this.projectId &&
other.milestoneId == this.milestoneId &&
other.parentId == this.parentId &&
other.createdAt == this.createdAt &&
other.updatedAt == this.updatedAt &&
other.cachedAt == this.cachedAt);
}
class CachedTasksCompanion extends UpdateCompanion<CachedTask> {
final Value<int> id;
final Value<String> title;
final Value<String?> description;
final Value<String> status;
final Value<String> priority;
final Value<DateTime?> dueDate;
final Value<int?> projectId;
final Value<int?> milestoneId;
final Value<int?> parentId;
final Value<DateTime> createdAt;
final Value<DateTime> updatedAt;
final Value<DateTime> cachedAt;
const CachedTasksCompanion({
this.id = const Value.absent(),
this.title = const Value.absent(),
this.description = const Value.absent(),
this.status = const Value.absent(),
this.priority = const Value.absent(),
this.dueDate = const Value.absent(),
this.projectId = const Value.absent(),
this.milestoneId = const Value.absent(),
this.parentId = const Value.absent(),
this.createdAt = const Value.absent(),
this.updatedAt = const Value.absent(),
this.cachedAt = const Value.absent(),
});
CachedTasksCompanion.insert({
this.id = const Value.absent(),
required String title,
this.description = const Value.absent(),
required String status,
required String priority,
this.dueDate = const Value.absent(),
this.projectId = const Value.absent(),
this.milestoneId = const Value.absent(),
this.parentId = const Value.absent(),
required DateTime createdAt,
required DateTime updatedAt,
this.cachedAt = const Value.absent(),
}) : title = Value(title),
status = Value(status),
priority = Value(priority),
createdAt = Value(createdAt),
updatedAt = Value(updatedAt);
static Insertable<CachedTask> custom({
Expression<int>? id,
Expression<String>? title,
Expression<String>? description,
Expression<String>? status,
Expression<String>? priority,
Expression<DateTime>? dueDate,
Expression<int>? projectId,
Expression<int>? milestoneId,
Expression<int>? parentId,
Expression<DateTime>? createdAt,
Expression<DateTime>? updatedAt,
Expression<DateTime>? cachedAt,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (title != null) 'title': title,
if (description != null) 'description': description,
if (status != null) 'status': status,
if (priority != null) 'priority': priority,
if (dueDate != null) 'due_date': dueDate,
if (projectId != null) 'project_id': projectId,
if (milestoneId != null) 'milestone_id': milestoneId,
if (parentId != null) 'parent_id': parentId,
if (createdAt != null) 'created_at': createdAt,
if (updatedAt != null) 'updated_at': updatedAt,
if (cachedAt != null) 'cached_at': cachedAt,
});
}
CachedTasksCompanion copyWith({
Value<int>? id,
Value<String>? title,
Value<String?>? description,
Value<String>? status,
Value<String>? priority,
Value<DateTime?>? dueDate,
Value<int?>? projectId,
Value<int?>? milestoneId,
Value<int?>? parentId,
Value<DateTime>? createdAt,
Value<DateTime>? updatedAt,
Value<DateTime>? cachedAt,
}) {
return CachedTasksCompanion(
id: id ?? this.id,
title: title ?? this.title,
description: description ?? this.description,
status: status ?? this.status,
priority: priority ?? this.priority,
dueDate: dueDate ?? this.dueDate,
projectId: projectId ?? this.projectId,
milestoneId: milestoneId ?? this.milestoneId,
parentId: parentId ?? this.parentId,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (title.present) {
map['title'] = Variable<String>(title.value);
}
if (description.present) {
map['description'] = Variable<String>(description.value);
}
if (status.present) {
map['status'] = Variable<String>(status.value);
}
if (priority.present) {
map['priority'] = Variable<String>(priority.value);
}
if (dueDate.present) {
map['due_date'] = Variable<DateTime>(dueDate.value);
}
if (projectId.present) {
map['project_id'] = Variable<int>(projectId.value);
}
if (milestoneId.present) {
map['milestone_id'] = Variable<int>(milestoneId.value);
}
if (parentId.present) {
map['parent_id'] = Variable<int>(parentId.value);
}
if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value);
}
if (updatedAt.present) {
map['updated_at'] = Variable<DateTime>(updatedAt.value);
}
if (cachedAt.present) {
map['cached_at'] = Variable<DateTime>(cachedAt.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('CachedTasksCompanion(')
..write('id: $id, ')
..write('title: $title, ')
..write('description: $description, ')
..write('status: $status, ')
..write('priority: $priority, ')
..write('dueDate: $dueDate, ')
..write('projectId: $projectId, ')
..write('milestoneId: $milestoneId, ')
..write('parentId: $parentId, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
}
class $CachedProjectsTable extends CachedProjects
with TableInfo<$CachedProjectsTable, CachedProject> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$CachedProjectsTable(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,
);
static const VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
'title',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _descriptionMeta = const VerificationMeta(
'description',
);
@override
late final GeneratedColumn<String> description = GeneratedColumn<String>(
'description',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
static const VerificationMeta _goalMeta = const VerificationMeta('goal');
@override
late final GeneratedColumn<String> goal = GeneratedColumn<String>(
'goal',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
static const VerificationMeta _statusMeta = const VerificationMeta('status');
@override
late final GeneratedColumn<String> status = GeneratedColumn<String>(
'status',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _colorMeta = const VerificationMeta('color');
@override
late final GeneratedColumn<String> color = GeneratedColumn<String>(
'color',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
static const VerificationMeta _autoSummaryMeta = const VerificationMeta(
'autoSummary',
);
@override
late final GeneratedColumn<String> autoSummary = GeneratedColumn<String>(
'auto_summary',
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: true,
);
static const VerificationMeta _updatedAtMeta = const VerificationMeta(
'updatedAt',
);
@override
late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(
'updated_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _cachedAtMeta = const VerificationMeta(
'cachedAt',
);
@override
late final GeneratedColumn<DateTime> cachedAt = GeneratedColumn<DateTime>(
'cached_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
clientDefault: () => DateTime.now(),
);
@override
List<GeneratedColumn> get $columns => [
id,
title,
description,
goal,
status,
color,
autoSummary,
createdAt,
updatedAt,
cachedAt,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'cached_projects';
@override
VerificationContext validateIntegrity(
Insertable<CachedProject> 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('title')) {
context.handle(
_titleMeta,
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
);
} else if (isInserting) {
context.missing(_titleMeta);
}
if (data.containsKey('description')) {
context.handle(
_descriptionMeta,
description.isAcceptableOrUnknown(
data['description']!,
_descriptionMeta,
),
);
}
if (data.containsKey('goal')) {
context.handle(
_goalMeta,
goal.isAcceptableOrUnknown(data['goal']!, _goalMeta),
);
}
if (data.containsKey('status')) {
context.handle(
_statusMeta,
status.isAcceptableOrUnknown(data['status']!, _statusMeta),
);
} else if (isInserting) {
context.missing(_statusMeta);
}
if (data.containsKey('color')) {
context.handle(
_colorMeta,
color.isAcceptableOrUnknown(data['color']!, _colorMeta),
);
}
if (data.containsKey('auto_summary')) {
context.handle(
_autoSummaryMeta,
autoSummary.isAcceptableOrUnknown(
data['auto_summary']!,
_autoSummaryMeta,
),
);
}
if (data.containsKey('created_at')) {
context.handle(
_createdAtMeta,
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
);
} else if (isInserting) {
context.missing(_createdAtMeta);
}
if (data.containsKey('updated_at')) {
context.handle(
_updatedAtMeta,
updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta),
);
} else if (isInserting) {
context.missing(_updatedAtMeta);
}
if (data.containsKey('cached_at')) {
context.handle(
_cachedAtMeta,
cachedAt.isAcceptableOrUnknown(data['cached_at']!, _cachedAtMeta),
);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
CachedProject map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return CachedProject(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
title: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}title'],
)!,
description: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}description'],
),
goal: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}goal'],
),
status: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}status'],
)!,
color: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}color'],
),
autoSummary: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}auto_summary'],
),
createdAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}created_at'],
)!,
updatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}updated_at'],
)!,
cachedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}cached_at'],
)!,
);
}
@override
$CachedProjectsTable createAlias(String alias) {
return $CachedProjectsTable(attachedDatabase, alias);
}
}
class CachedProject extends DataClass implements Insertable<CachedProject> {
final int id;
final String title;
final String? description;
final String? goal;
final String status;
final String? color;
final String? autoSummary;
final DateTime createdAt;
final DateTime updatedAt;
final DateTime cachedAt;
const CachedProject({
required this.id,
required this.title,
this.description,
this.goal,
required this.status,
this.color,
this.autoSummary,
required this.createdAt,
required this.updatedAt,
required this.cachedAt,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['title'] = Variable<String>(title);
if (!nullToAbsent || description != null) {
map['description'] = Variable<String>(description);
}
if (!nullToAbsent || goal != null) {
map['goal'] = Variable<String>(goal);
}
map['status'] = Variable<String>(status);
if (!nullToAbsent || color != null) {
map['color'] = Variable<String>(color);
}
if (!nullToAbsent || autoSummary != null) {
map['auto_summary'] = Variable<String>(autoSummary);
}
map['created_at'] = Variable<DateTime>(createdAt);
map['updated_at'] = Variable<DateTime>(updatedAt);
map['cached_at'] = Variable<DateTime>(cachedAt);
return map;
}
CachedProjectsCompanion toCompanion(bool nullToAbsent) {
return CachedProjectsCompanion(
id: Value(id),
title: Value(title),
description: description == null && nullToAbsent
? const Value.absent()
: Value(description),
goal: goal == null && nullToAbsent ? const Value.absent() : Value(goal),
status: Value(status),
color: color == null && nullToAbsent
? const Value.absent()
: Value(color),
autoSummary: autoSummary == null && nullToAbsent
? const Value.absent()
: Value(autoSummary),
createdAt: Value(createdAt),
updatedAt: Value(updatedAt),
cachedAt: Value(cachedAt),
);
}
factory CachedProject.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return CachedProject(
id: serializer.fromJson<int>(json['id']),
title: serializer.fromJson<String>(json['title']),
description: serializer.fromJson<String?>(json['description']),
goal: serializer.fromJson<String?>(json['goal']),
status: serializer.fromJson<String>(json['status']),
color: serializer.fromJson<String?>(json['color']),
autoSummary: serializer.fromJson<String?>(json['autoSummary']),
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
cachedAt: serializer.fromJson<DateTime>(json['cachedAt']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'title': serializer.toJson<String>(title),
'description': serializer.toJson<String?>(description),
'goal': serializer.toJson<String?>(goal),
'status': serializer.toJson<String>(status),
'color': serializer.toJson<String?>(color),
'autoSummary': serializer.toJson<String?>(autoSummary),
'createdAt': serializer.toJson<DateTime>(createdAt),
'updatedAt': serializer.toJson<DateTime>(updatedAt),
'cachedAt': serializer.toJson<DateTime>(cachedAt),
};
}
CachedProject copyWith({
int? id,
String? title,
Value<String?> description = const Value.absent(),
Value<String?> goal = const Value.absent(),
String? status,
Value<String?> color = const Value.absent(),
Value<String?> autoSummary = const Value.absent(),
DateTime? createdAt,
DateTime? updatedAt,
DateTime? cachedAt,
}) => CachedProject(
id: id ?? this.id,
title: title ?? this.title,
description: description.present ? description.value : this.description,
goal: goal.present ? goal.value : this.goal,
status: status ?? this.status,
color: color.present ? color.value : this.color,
autoSummary: autoSummary.present ? autoSummary.value : this.autoSummary,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
CachedProject copyWithCompanion(CachedProjectsCompanion data) {
return CachedProject(
id: data.id.present ? data.id.value : this.id,
title: data.title.present ? data.title.value : this.title,
description: data.description.present
? data.description.value
: this.description,
goal: data.goal.present ? data.goal.value : this.goal,
status: data.status.present ? data.status.value : this.status,
color: data.color.present ? data.color.value : this.color,
autoSummary: data.autoSummary.present
? data.autoSummary.value
: this.autoSummary,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
cachedAt: data.cachedAt.present ? data.cachedAt.value : this.cachedAt,
);
}
@override
String toString() {
return (StringBuffer('CachedProject(')
..write('id: $id, ')
..write('title: $title, ')
..write('description: $description, ')
..write('goal: $goal, ')
..write('status: $status, ')
..write('color: $color, ')
..write('autoSummary: $autoSummary, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
title,
description,
goal,
status,
color,
autoSummary,
createdAt,
updatedAt,
cachedAt,
);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is CachedProject &&
other.id == this.id &&
other.title == this.title &&
other.description == this.description &&
other.goal == this.goal &&
other.status == this.status &&
other.color == this.color &&
other.autoSummary == this.autoSummary &&
other.createdAt == this.createdAt &&
other.updatedAt == this.updatedAt &&
other.cachedAt == this.cachedAt);
}
class CachedProjectsCompanion extends UpdateCompanion<CachedProject> {
final Value<int> id;
final Value<String> title;
final Value<String?> description;
final Value<String?> goal;
final Value<String> status;
final Value<String?> color;
final Value<String?> autoSummary;
final Value<DateTime> createdAt;
final Value<DateTime> updatedAt;
final Value<DateTime> cachedAt;
const CachedProjectsCompanion({
this.id = const Value.absent(),
this.title = const Value.absent(),
this.description = const Value.absent(),
this.goal = const Value.absent(),
this.status = const Value.absent(),
this.color = const Value.absent(),
this.autoSummary = const Value.absent(),
this.createdAt = const Value.absent(),
this.updatedAt = const Value.absent(),
this.cachedAt = const Value.absent(),
});
CachedProjectsCompanion.insert({
this.id = const Value.absent(),
required String title,
this.description = const Value.absent(),
this.goal = const Value.absent(),
required String status,
this.color = const Value.absent(),
this.autoSummary = const Value.absent(),
required DateTime createdAt,
required DateTime updatedAt,
this.cachedAt = const Value.absent(),
}) : title = Value(title),
status = Value(status),
createdAt = Value(createdAt),
updatedAt = Value(updatedAt);
static Insertable<CachedProject> custom({
Expression<int>? id,
Expression<String>? title,
Expression<String>? description,
Expression<String>? goal,
Expression<String>? status,
Expression<String>? color,
Expression<String>? autoSummary,
Expression<DateTime>? createdAt,
Expression<DateTime>? updatedAt,
Expression<DateTime>? cachedAt,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (title != null) 'title': title,
if (description != null) 'description': description,
if (goal != null) 'goal': goal,
if (status != null) 'status': status,
if (color != null) 'color': color,
if (autoSummary != null) 'auto_summary': autoSummary,
if (createdAt != null) 'created_at': createdAt,
if (updatedAt != null) 'updated_at': updatedAt,
if (cachedAt != null) 'cached_at': cachedAt,
});
}
CachedProjectsCompanion copyWith({
Value<int>? id,
Value<String>? title,
Value<String?>? description,
Value<String?>? goal,
Value<String>? status,
Value<String?>? color,
Value<String?>? autoSummary,
Value<DateTime>? createdAt,
Value<DateTime>? updatedAt,
Value<DateTime>? cachedAt,
}) {
return CachedProjectsCompanion(
id: id ?? this.id,
title: title ?? this.title,
description: description ?? this.description,
goal: goal ?? this.goal,
status: status ?? this.status,
color: color ?? this.color,
autoSummary: autoSummary ?? this.autoSummary,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (title.present) {
map['title'] = Variable<String>(title.value);
}
if (description.present) {
map['description'] = Variable<String>(description.value);
}
if (goal.present) {
map['goal'] = Variable<String>(goal.value);
}
if (status.present) {
map['status'] = Variable<String>(status.value);
}
if (color.present) {
map['color'] = Variable<String>(color.value);
}
if (autoSummary.present) {
map['auto_summary'] = Variable<String>(autoSummary.value);
}
if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value);
}
if (updatedAt.present) {
map['updated_at'] = Variable<DateTime>(updatedAt.value);
}
if (cachedAt.present) {
map['cached_at'] = Variable<DateTime>(cachedAt.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('CachedProjectsCompanion(')
..write('id: $id, ')
..write('title: $title, ')
..write('description: $description, ')
..write('goal: $goal, ')
..write('status: $status, ')
..write('color: $color, ')
..write('autoSummary: $autoSummary, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
}
class $CachedMilestonesTable extends CachedMilestones
with TableInfo<$CachedMilestonesTable, CachedMilestone> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$CachedMilestonesTable(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,
);
static const VerificationMeta _projectIdMeta = const VerificationMeta(
'projectId',
);
@override
late final GeneratedColumn<int> projectId = GeneratedColumn<int>(
'project_id',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: true,
);
static const VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
'title',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _descriptionMeta = const VerificationMeta(
'description',
);
@override
late final GeneratedColumn<String> description = GeneratedColumn<String>(
'description',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
static const VerificationMeta _statusMeta = const VerificationMeta('status');
@override
late final GeneratedColumn<String> status = GeneratedColumn<String>(
'status',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _orderIndexMeta = const VerificationMeta(
'orderIndex',
);
@override
late final GeneratedColumn<int> orderIndex = GeneratedColumn<int>(
'order_index',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultValue: const Constant(0),
);
static const VerificationMeta _totalMeta = const VerificationMeta('total');
@override
late final GeneratedColumn<int> total = GeneratedColumn<int>(
'total',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultValue: const Constant(0),
);
static const VerificationMeta _completedMeta = const VerificationMeta(
'completed',
);
@override
late final GeneratedColumn<int> completed = GeneratedColumn<int>(
'completed',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultValue: const Constant(0),
);
static const VerificationMeta _pctMeta = const VerificationMeta('pct');
@override
late final GeneratedColumn<double> pct = GeneratedColumn<double>(
'pct',
aliasedName,
false,
type: DriftSqlType.double,
requiredDuringInsert: false,
defaultValue: const Constant(0.0),
);
static const VerificationMeta _createdAtMeta = const VerificationMeta(
'createdAt',
);
@override
late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(
'created_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _updatedAtMeta = const VerificationMeta(
'updatedAt',
);
@override
late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(
'updated_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _cachedAtMeta = const VerificationMeta(
'cachedAt',
);
@override
late final GeneratedColumn<DateTime> cachedAt = GeneratedColumn<DateTime>(
'cached_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
clientDefault: () => DateTime.now(),
);
@override
List<GeneratedColumn> get $columns => [
id,
projectId,
title,
description,
status,
orderIndex,
total,
completed,
pct,
createdAt,
updatedAt,
cachedAt,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'cached_milestones';
@override
VerificationContext validateIntegrity(
Insertable<CachedMilestone> 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('project_id')) {
context.handle(
_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta),
);
} else if (isInserting) {
context.missing(_projectIdMeta);
}
if (data.containsKey('title')) {
context.handle(
_titleMeta,
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
);
} else if (isInserting) {
context.missing(_titleMeta);
}
if (data.containsKey('description')) {
context.handle(
_descriptionMeta,
description.isAcceptableOrUnknown(
data['description']!,
_descriptionMeta,
),
);
}
if (data.containsKey('status')) {
context.handle(
_statusMeta,
status.isAcceptableOrUnknown(data['status']!, _statusMeta),
);
} else if (isInserting) {
context.missing(_statusMeta);
}
if (data.containsKey('order_index')) {
context.handle(
_orderIndexMeta,
orderIndex.isAcceptableOrUnknown(data['order_index']!, _orderIndexMeta),
);
}
if (data.containsKey('total')) {
context.handle(
_totalMeta,
total.isAcceptableOrUnknown(data['total']!, _totalMeta),
);
}
if (data.containsKey('completed')) {
context.handle(
_completedMeta,
completed.isAcceptableOrUnknown(data['completed']!, _completedMeta),
);
}
if (data.containsKey('pct')) {
context.handle(
_pctMeta,
pct.isAcceptableOrUnknown(data['pct']!, _pctMeta),
);
}
if (data.containsKey('created_at')) {
context.handle(
_createdAtMeta,
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
);
} else if (isInserting) {
context.missing(_createdAtMeta);
}
if (data.containsKey('updated_at')) {
context.handle(
_updatedAtMeta,
updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta),
);
} else if (isInserting) {
context.missing(_updatedAtMeta);
}
if (data.containsKey('cached_at')) {
context.handle(
_cachedAtMeta,
cachedAt.isAcceptableOrUnknown(data['cached_at']!, _cachedAtMeta),
);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
CachedMilestone map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return CachedMilestone(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
projectId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}project_id'],
)!,
title: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}title'],
)!,
description: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}description'],
),
status: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}status'],
)!,
orderIndex: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}order_index'],
)!,
total: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}total'],
)!,
completed: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}completed'],
)!,
pct: attachedDatabase.typeMapping.read(
DriftSqlType.double,
data['${effectivePrefix}pct'],
)!,
createdAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}created_at'],
)!,
updatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}updated_at'],
)!,
cachedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}cached_at'],
)!,
);
}
@override
$CachedMilestonesTable createAlias(String alias) {
return $CachedMilestonesTable(attachedDatabase, alias);
}
}
class CachedMilestone extends DataClass implements Insertable<CachedMilestone> {
final int id;
final int projectId;
final String title;
final String? description;
final String status;
final int orderIndex;
final int total;
final int completed;
final double pct;
final DateTime createdAt;
final DateTime updatedAt;
final DateTime cachedAt;
const CachedMilestone({
required this.id,
required this.projectId,
required this.title,
this.description,
required this.status,
required this.orderIndex,
required this.total,
required this.completed,
required this.pct,
required this.createdAt,
required this.updatedAt,
required this.cachedAt,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['project_id'] = Variable<int>(projectId);
map['title'] = Variable<String>(title);
if (!nullToAbsent || description != null) {
map['description'] = Variable<String>(description);
}
map['status'] = Variable<String>(status);
map['order_index'] = Variable<int>(orderIndex);
map['total'] = Variable<int>(total);
map['completed'] = Variable<int>(completed);
map['pct'] = Variable<double>(pct);
map['created_at'] = Variable<DateTime>(createdAt);
map['updated_at'] = Variable<DateTime>(updatedAt);
map['cached_at'] = Variable<DateTime>(cachedAt);
return map;
}
CachedMilestonesCompanion toCompanion(bool nullToAbsent) {
return CachedMilestonesCompanion(
id: Value(id),
projectId: Value(projectId),
title: Value(title),
description: description == null && nullToAbsent
? const Value.absent()
: Value(description),
status: Value(status),
orderIndex: Value(orderIndex),
total: Value(total),
completed: Value(completed),
pct: Value(pct),
createdAt: Value(createdAt),
updatedAt: Value(updatedAt),
cachedAt: Value(cachedAt),
);
}
factory CachedMilestone.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return CachedMilestone(
id: serializer.fromJson<int>(json['id']),
projectId: serializer.fromJson<int>(json['projectId']),
title: serializer.fromJson<String>(json['title']),
description: serializer.fromJson<String?>(json['description']),
status: serializer.fromJson<String>(json['status']),
orderIndex: serializer.fromJson<int>(json['orderIndex']),
total: serializer.fromJson<int>(json['total']),
completed: serializer.fromJson<int>(json['completed']),
pct: serializer.fromJson<double>(json['pct']),
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
cachedAt: serializer.fromJson<DateTime>(json['cachedAt']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'projectId': serializer.toJson<int>(projectId),
'title': serializer.toJson<String>(title),
'description': serializer.toJson<String?>(description),
'status': serializer.toJson<String>(status),
'orderIndex': serializer.toJson<int>(orderIndex),
'total': serializer.toJson<int>(total),
'completed': serializer.toJson<int>(completed),
'pct': serializer.toJson<double>(pct),
'createdAt': serializer.toJson<DateTime>(createdAt),
'updatedAt': serializer.toJson<DateTime>(updatedAt),
'cachedAt': serializer.toJson<DateTime>(cachedAt),
};
}
CachedMilestone copyWith({
int? id,
int? projectId,
String? title,
Value<String?> description = const Value.absent(),
String? status,
int? orderIndex,
int? total,
int? completed,
double? pct,
DateTime? createdAt,
DateTime? updatedAt,
DateTime? cachedAt,
}) => CachedMilestone(
id: id ?? this.id,
projectId: projectId ?? this.projectId,
title: title ?? this.title,
description: description.present ? description.value : this.description,
status: status ?? this.status,
orderIndex: orderIndex ?? this.orderIndex,
total: total ?? this.total,
completed: completed ?? this.completed,
pct: pct ?? this.pct,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
CachedMilestone copyWithCompanion(CachedMilestonesCompanion data) {
return CachedMilestone(
id: data.id.present ? data.id.value : this.id,
projectId: data.projectId.present ? data.projectId.value : this.projectId,
title: data.title.present ? data.title.value : this.title,
description: data.description.present
? data.description.value
: this.description,
status: data.status.present ? data.status.value : this.status,
orderIndex: data.orderIndex.present
? data.orderIndex.value
: this.orderIndex,
total: data.total.present ? data.total.value : this.total,
completed: data.completed.present ? data.completed.value : this.completed,
pct: data.pct.present ? data.pct.value : this.pct,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
cachedAt: data.cachedAt.present ? data.cachedAt.value : this.cachedAt,
);
}
@override
String toString() {
return (StringBuffer('CachedMilestone(')
..write('id: $id, ')
..write('projectId: $projectId, ')
..write('title: $title, ')
..write('description: $description, ')
..write('status: $status, ')
..write('orderIndex: $orderIndex, ')
..write('total: $total, ')
..write('completed: $completed, ')
..write('pct: $pct, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
projectId,
title,
description,
status,
orderIndex,
total,
completed,
pct,
createdAt,
updatedAt,
cachedAt,
);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is CachedMilestone &&
other.id == this.id &&
other.projectId == this.projectId &&
other.title == this.title &&
other.description == this.description &&
other.status == this.status &&
other.orderIndex == this.orderIndex &&
other.total == this.total &&
other.completed == this.completed &&
other.pct == this.pct &&
other.createdAt == this.createdAt &&
other.updatedAt == this.updatedAt &&
other.cachedAt == this.cachedAt);
}
class CachedMilestonesCompanion extends UpdateCompanion<CachedMilestone> {
final Value<int> id;
final Value<int> projectId;
final Value<String> title;
final Value<String?> description;
final Value<String> status;
final Value<int> orderIndex;
final Value<int> total;
final Value<int> completed;
final Value<double> pct;
final Value<DateTime> createdAt;
final Value<DateTime> updatedAt;
final Value<DateTime> cachedAt;
const CachedMilestonesCompanion({
this.id = const Value.absent(),
this.projectId = const Value.absent(),
this.title = const Value.absent(),
this.description = const Value.absent(),
this.status = const Value.absent(),
this.orderIndex = const Value.absent(),
this.total = const Value.absent(),
this.completed = const Value.absent(),
this.pct = const Value.absent(),
this.createdAt = const Value.absent(),
this.updatedAt = const Value.absent(),
this.cachedAt = const Value.absent(),
});
CachedMilestonesCompanion.insert({
this.id = const Value.absent(),
required int projectId,
required String title,
this.description = const Value.absent(),
required String status,
this.orderIndex = const Value.absent(),
this.total = const Value.absent(),
this.completed = const Value.absent(),
this.pct = const Value.absent(),
required DateTime createdAt,
required DateTime updatedAt,
this.cachedAt = const Value.absent(),
}) : projectId = Value(projectId),
title = Value(title),
status = Value(status),
createdAt = Value(createdAt),
updatedAt = Value(updatedAt);
static Insertable<CachedMilestone> custom({
Expression<int>? id,
Expression<int>? projectId,
Expression<String>? title,
Expression<String>? description,
Expression<String>? status,
Expression<int>? orderIndex,
Expression<int>? total,
Expression<int>? completed,
Expression<double>? pct,
Expression<DateTime>? createdAt,
Expression<DateTime>? updatedAt,
Expression<DateTime>? cachedAt,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (projectId != null) 'project_id': projectId,
if (title != null) 'title': title,
if (description != null) 'description': description,
if (status != null) 'status': status,
if (orderIndex != null) 'order_index': orderIndex,
if (total != null) 'total': total,
if (completed != null) 'completed': completed,
if (pct != null) 'pct': pct,
if (createdAt != null) 'created_at': createdAt,
if (updatedAt != null) 'updated_at': updatedAt,
if (cachedAt != null) 'cached_at': cachedAt,
});
}
CachedMilestonesCompanion copyWith({
Value<int>? id,
Value<int>? projectId,
Value<String>? title,
Value<String?>? description,
Value<String>? status,
Value<int>? orderIndex,
Value<int>? total,
Value<int>? completed,
Value<double>? pct,
Value<DateTime>? createdAt,
Value<DateTime>? updatedAt,
Value<DateTime>? cachedAt,
}) {
return CachedMilestonesCompanion(
id: id ?? this.id,
projectId: projectId ?? this.projectId,
title: title ?? this.title,
description: description ?? this.description,
status: status ?? this.status,
orderIndex: orderIndex ?? this.orderIndex,
total: total ?? this.total,
completed: completed ?? this.completed,
pct: pct ?? this.pct,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (projectId.present) {
map['project_id'] = Variable<int>(projectId.value);
}
if (title.present) {
map['title'] = Variable<String>(title.value);
}
if (description.present) {
map['description'] = Variable<String>(description.value);
}
if (status.present) {
map['status'] = Variable<String>(status.value);
}
if (orderIndex.present) {
map['order_index'] = Variable<int>(orderIndex.value);
}
if (total.present) {
map['total'] = Variable<int>(total.value);
}
if (completed.present) {
map['completed'] = Variable<int>(completed.value);
}
if (pct.present) {
map['pct'] = Variable<double>(pct.value);
}
if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value);
}
if (updatedAt.present) {
map['updated_at'] = Variable<DateTime>(updatedAt.value);
}
if (cachedAt.present) {
map['cached_at'] = Variable<DateTime>(cachedAt.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('CachedMilestonesCompanion(')
..write('id: $id, ')
..write('projectId: $projectId, ')
..write('title: $title, ')
..write('description: $description, ')
..write('status: $status, ')
..write('orderIndex: $orderIndex, ')
..write('total: $total, ')
..write('completed: $completed, ')
..write('pct: $pct, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
}
class $CachedCalendarEventsTable extends CachedCalendarEvents
with TableInfo<$CachedCalendarEventsTable, CachedCalendarEvent> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$CachedCalendarEventsTable(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,
);
static const VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
'title',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _startDtMeta = const VerificationMeta(
'startDt',
);
@override
late final GeneratedColumn<DateTime> startDt = GeneratedColumn<DateTime>(
'start_dt',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _endDtMeta = const VerificationMeta('endDt');
@override
late final GeneratedColumn<DateTime> endDt = GeneratedColumn<DateTime>(
'end_dt',
aliasedName,
true,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
);
static const VerificationMeta _allDayMeta = const VerificationMeta('allDay');
@override
late final GeneratedColumn<bool> allDay = GeneratedColumn<bool>(
'all_day',
aliasedName,
false,
type: DriftSqlType.bool,
requiredDuringInsert: false,
defaultConstraints: GeneratedColumn.constraintIsAlways(
'CHECK ("all_day" IN (0, 1))',
),
defaultValue: const Constant(false),
);
static const VerificationMeta _descriptionMeta = const VerificationMeta(
'description',
);
@override
late final GeneratedColumn<String> description = GeneratedColumn<String>(
'description',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultValue: const Constant(''),
);
static const VerificationMeta _locationMeta = const VerificationMeta(
'location',
);
@override
late final GeneratedColumn<String> location = GeneratedColumn<String>(
'location',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultValue: const Constant(''),
);
static const VerificationMeta _colorMeta = const VerificationMeta('color');
@override
late final GeneratedColumn<String> color = GeneratedColumn<String>(
'color',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultValue: const Constant(''),
);
static const VerificationMeta _recurrenceMeta = const VerificationMeta(
'recurrence',
);
@override
late final GeneratedColumn<String> recurrence = GeneratedColumn<String>(
'recurrence',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
static const VerificationMeta _projectIdMeta = const VerificationMeta(
'projectId',
);
@override
late final GeneratedColumn<int> projectId = GeneratedColumn<int>(
'project_id',
aliasedName,
true,
type: DriftSqlType.int,
requiredDuringInsert: false,
);
static const VerificationMeta _reminderMinutesMeta = const VerificationMeta(
'reminderMinutes',
);
@override
late final GeneratedColumn<int> reminderMinutes = GeneratedColumn<int>(
'reminder_minutes',
aliasedName,
true,
type: DriftSqlType.int,
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,
clientDefault: () => DateTime.now(),
);
@override
List<GeneratedColumn> get $columns => [
id,
title,
startDt,
endDt,
allDay,
description,
location,
color,
recurrence,
projectId,
reminderMinutes,
cachedAt,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'cached_calendar_events';
@override
VerificationContext validateIntegrity(
Insertable<CachedCalendarEvent> 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('title')) {
context.handle(
_titleMeta,
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
);
} else if (isInserting) {
context.missing(_titleMeta);
}
if (data.containsKey('start_dt')) {
context.handle(
_startDtMeta,
startDt.isAcceptableOrUnknown(data['start_dt']!, _startDtMeta),
);
} else if (isInserting) {
context.missing(_startDtMeta);
}
if (data.containsKey('end_dt')) {
context.handle(
_endDtMeta,
endDt.isAcceptableOrUnknown(data['end_dt']!, _endDtMeta),
);
}
if (data.containsKey('all_day')) {
context.handle(
_allDayMeta,
allDay.isAcceptableOrUnknown(data['all_day']!, _allDayMeta),
);
}
if (data.containsKey('description')) {
context.handle(
_descriptionMeta,
description.isAcceptableOrUnknown(
data['description']!,
_descriptionMeta,
),
);
}
if (data.containsKey('location')) {
context.handle(
_locationMeta,
location.isAcceptableOrUnknown(data['location']!, _locationMeta),
);
}
if (data.containsKey('color')) {
context.handle(
_colorMeta,
color.isAcceptableOrUnknown(data['color']!, _colorMeta),
);
}
if (data.containsKey('recurrence')) {
context.handle(
_recurrenceMeta,
recurrence.isAcceptableOrUnknown(data['recurrence']!, _recurrenceMeta),
);
}
if (data.containsKey('project_id')) {
context.handle(
_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta),
);
}
if (data.containsKey('reminder_minutes')) {
context.handle(
_reminderMinutesMeta,
reminderMinutes.isAcceptableOrUnknown(
data['reminder_minutes']!,
_reminderMinutesMeta,
),
);
}
if (data.containsKey('cached_at')) {
context.handle(
_cachedAtMeta,
cachedAt.isAcceptableOrUnknown(data['cached_at']!, _cachedAtMeta),
);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
CachedCalendarEvent map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return CachedCalendarEvent(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
title: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}title'],
)!,
startDt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}start_dt'],
)!,
endDt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}end_dt'],
),
allDay: attachedDatabase.typeMapping.read(
DriftSqlType.bool,
data['${effectivePrefix}all_day'],
)!,
description: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}description'],
)!,
location: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}location'],
)!,
color: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}color'],
)!,
recurrence: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}recurrence'],
),
projectId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}project_id'],
),
reminderMinutes: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}reminder_minutes'],
),
cachedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}cached_at'],
)!,
);
}
@override
$CachedCalendarEventsTable createAlias(String alias) {
return $CachedCalendarEventsTable(attachedDatabase, alias);
}
}
class CachedCalendarEvent extends DataClass
implements Insertable<CachedCalendarEvent> {
final int id;
final String title;
final DateTime startDt;
final DateTime? endDt;
final bool allDay;
final String description;
final String location;
final String color;
final String? recurrence;
final int? projectId;
final int? reminderMinutes;
final DateTime cachedAt;
const CachedCalendarEvent({
required this.id,
required this.title,
required this.startDt,
this.endDt,
required this.allDay,
required this.description,
required this.location,
required this.color,
this.recurrence,
this.projectId,
this.reminderMinutes,
required this.cachedAt,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['title'] = Variable<String>(title);
map['start_dt'] = Variable<DateTime>(startDt);
if (!nullToAbsent || endDt != null) {
map['end_dt'] = Variable<DateTime>(endDt);
}
map['all_day'] = Variable<bool>(allDay);
map['description'] = Variable<String>(description);
map['location'] = Variable<String>(location);
map['color'] = Variable<String>(color);
if (!nullToAbsent || recurrence != null) {
map['recurrence'] = Variable<String>(recurrence);
}
if (!nullToAbsent || projectId != null) {
map['project_id'] = Variable<int>(projectId);
}
if (!nullToAbsent || reminderMinutes != null) {
map['reminder_minutes'] = Variable<int>(reminderMinutes);
}
map['cached_at'] = Variable<DateTime>(cachedAt);
return map;
}
CachedCalendarEventsCompanion toCompanion(bool nullToAbsent) {
return CachedCalendarEventsCompanion(
id: Value(id),
title: Value(title),
startDt: Value(startDt),
endDt: endDt == null && nullToAbsent
? const Value.absent()
: Value(endDt),
allDay: Value(allDay),
description: Value(description),
location: Value(location),
color: Value(color),
recurrence: recurrence == null && nullToAbsent
? const Value.absent()
: Value(recurrence),
projectId: projectId == null && nullToAbsent
? const Value.absent()
: Value(projectId),
reminderMinutes: reminderMinutes == null && nullToAbsent
? const Value.absent()
: Value(reminderMinutes),
cachedAt: Value(cachedAt),
);
}
factory CachedCalendarEvent.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return CachedCalendarEvent(
id: serializer.fromJson<int>(json['id']),
title: serializer.fromJson<String>(json['title']),
startDt: serializer.fromJson<DateTime>(json['startDt']),
endDt: serializer.fromJson<DateTime?>(json['endDt']),
allDay: serializer.fromJson<bool>(json['allDay']),
description: serializer.fromJson<String>(json['description']),
location: serializer.fromJson<String>(json['location']),
color: serializer.fromJson<String>(json['color']),
recurrence: serializer.fromJson<String?>(json['recurrence']),
projectId: serializer.fromJson<int?>(json['projectId']),
reminderMinutes: serializer.fromJson<int?>(json['reminderMinutes']),
cachedAt: serializer.fromJson<DateTime>(json['cachedAt']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'title': serializer.toJson<String>(title),
'startDt': serializer.toJson<DateTime>(startDt),
'endDt': serializer.toJson<DateTime?>(endDt),
'allDay': serializer.toJson<bool>(allDay),
'description': serializer.toJson<String>(description),
'location': serializer.toJson<String>(location),
'color': serializer.toJson<String>(color),
'recurrence': serializer.toJson<String?>(recurrence),
'projectId': serializer.toJson<int?>(projectId),
'reminderMinutes': serializer.toJson<int?>(reminderMinutes),
'cachedAt': serializer.toJson<DateTime>(cachedAt),
};
}
CachedCalendarEvent copyWith({
int? id,
String? title,
DateTime? startDt,
Value<DateTime?> endDt = const Value.absent(),
bool? allDay,
String? description,
String? location,
String? color,
Value<String?> recurrence = const Value.absent(),
Value<int?> projectId = const Value.absent(),
Value<int?> reminderMinutes = const Value.absent(),
DateTime? cachedAt,
}) => CachedCalendarEvent(
id: id ?? this.id,
title: title ?? this.title,
startDt: startDt ?? this.startDt,
endDt: endDt.present ? endDt.value : this.endDt,
allDay: allDay ?? this.allDay,
description: description ?? this.description,
location: location ?? this.location,
color: color ?? this.color,
recurrence: recurrence.present ? recurrence.value : this.recurrence,
projectId: projectId.present ? projectId.value : this.projectId,
reminderMinutes: reminderMinutes.present
? reminderMinutes.value
: this.reminderMinutes,
cachedAt: cachedAt ?? this.cachedAt,
);
CachedCalendarEvent copyWithCompanion(CachedCalendarEventsCompanion data) {
return CachedCalendarEvent(
id: data.id.present ? data.id.value : this.id,
title: data.title.present ? data.title.value : this.title,
startDt: data.startDt.present ? data.startDt.value : this.startDt,
endDt: data.endDt.present ? data.endDt.value : this.endDt,
allDay: data.allDay.present ? data.allDay.value : this.allDay,
description: data.description.present
? data.description.value
: this.description,
location: data.location.present ? data.location.value : this.location,
color: data.color.present ? data.color.value : this.color,
recurrence: data.recurrence.present
? data.recurrence.value
: this.recurrence,
projectId: data.projectId.present ? data.projectId.value : this.projectId,
reminderMinutes: data.reminderMinutes.present
? data.reminderMinutes.value
: this.reminderMinutes,
cachedAt: data.cachedAt.present ? data.cachedAt.value : this.cachedAt,
);
}
@override
String toString() {
return (StringBuffer('CachedCalendarEvent(')
..write('id: $id, ')
..write('title: $title, ')
..write('startDt: $startDt, ')
..write('endDt: $endDt, ')
..write('allDay: $allDay, ')
..write('description: $description, ')
..write('location: $location, ')
..write('color: $color, ')
..write('recurrence: $recurrence, ')
..write('projectId: $projectId, ')
..write('reminderMinutes: $reminderMinutes, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
title,
startDt,
endDt,
allDay,
description,
location,
color,
recurrence,
projectId,
reminderMinutes,
cachedAt,
);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is CachedCalendarEvent &&
other.id == this.id &&
other.title == this.title &&
other.startDt == this.startDt &&
other.endDt == this.endDt &&
other.allDay == this.allDay &&
other.description == this.description &&
other.location == this.location &&
other.color == this.color &&
other.recurrence == this.recurrence &&
other.projectId == this.projectId &&
other.reminderMinutes == this.reminderMinutes &&
other.cachedAt == this.cachedAt);
}
class CachedCalendarEventsCompanion
extends UpdateCompanion<CachedCalendarEvent> {
final Value<int> id;
final Value<String> title;
final Value<DateTime> startDt;
final Value<DateTime?> endDt;
final Value<bool> allDay;
final Value<String> description;
final Value<String> location;
final Value<String> color;
final Value<String?> recurrence;
final Value<int?> projectId;
final Value<int?> reminderMinutes;
final Value<DateTime> cachedAt;
const CachedCalendarEventsCompanion({
this.id = const Value.absent(),
this.title = const Value.absent(),
this.startDt = const Value.absent(),
this.endDt = const Value.absent(),
this.allDay = const Value.absent(),
this.description = const Value.absent(),
this.location = const Value.absent(),
this.color = const Value.absent(),
this.recurrence = const Value.absent(),
this.projectId = const Value.absent(),
this.reminderMinutes = const Value.absent(),
this.cachedAt = const Value.absent(),
});
CachedCalendarEventsCompanion.insert({
this.id = const Value.absent(),
required String title,
required DateTime startDt,
this.endDt = const Value.absent(),
this.allDay = const Value.absent(),
this.description = const Value.absent(),
this.location = const Value.absent(),
this.color = const Value.absent(),
this.recurrence = const Value.absent(),
this.projectId = const Value.absent(),
this.reminderMinutes = const Value.absent(),
this.cachedAt = const Value.absent(),
}) : title = Value(title),
startDt = Value(startDt);
static Insertable<CachedCalendarEvent> custom({
Expression<int>? id,
Expression<String>? title,
Expression<DateTime>? startDt,
Expression<DateTime>? endDt,
Expression<bool>? allDay,
Expression<String>? description,
Expression<String>? location,
Expression<String>? color,
Expression<String>? recurrence,
Expression<int>? projectId,
Expression<int>? reminderMinutes,
Expression<DateTime>? cachedAt,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (title != null) 'title': title,
if (startDt != null) 'start_dt': startDt,
if (endDt != null) 'end_dt': endDt,
if (allDay != null) 'all_day': allDay,
if (description != null) 'description': description,
if (location != null) 'location': location,
if (color != null) 'color': color,
if (recurrence != null) 'recurrence': recurrence,
if (projectId != null) 'project_id': projectId,
if (reminderMinutes != null) 'reminder_minutes': reminderMinutes,
if (cachedAt != null) 'cached_at': cachedAt,
});
}
CachedCalendarEventsCompanion copyWith({
Value<int>? id,
Value<String>? title,
Value<DateTime>? startDt,
Value<DateTime?>? endDt,
Value<bool>? allDay,
Value<String>? description,
Value<String>? location,
Value<String>? color,
Value<String?>? recurrence,
Value<int?>? projectId,
Value<int?>? reminderMinutes,
Value<DateTime>? cachedAt,
}) {
return CachedCalendarEventsCompanion(
id: id ?? this.id,
title: title ?? this.title,
startDt: startDt ?? this.startDt,
endDt: endDt ?? this.endDt,
allDay: allDay ?? this.allDay,
description: description ?? this.description,
location: location ?? this.location,
color: color ?? this.color,
recurrence: recurrence ?? this.recurrence,
projectId: projectId ?? this.projectId,
reminderMinutes: reminderMinutes ?? this.reminderMinutes,
cachedAt: cachedAt ?? this.cachedAt,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (title.present) {
map['title'] = Variable<String>(title.value);
}
if (startDt.present) {
map['start_dt'] = Variable<DateTime>(startDt.value);
}
if (endDt.present) {
map['end_dt'] = Variable<DateTime>(endDt.value);
}
if (allDay.present) {
map['all_day'] = Variable<bool>(allDay.value);
}
if (description.present) {
map['description'] = Variable<String>(description.value);
}
if (location.present) {
map['location'] = Variable<String>(location.value);
}
if (color.present) {
map['color'] = Variable<String>(color.value);
}
if (recurrence.present) {
map['recurrence'] = Variable<String>(recurrence.value);
}
if (projectId.present) {
map['project_id'] = Variable<int>(projectId.value);
}
if (reminderMinutes.present) {
map['reminder_minutes'] = Variable<int>(reminderMinutes.value);
}
if (cachedAt.present) {
map['cached_at'] = Variable<DateTime>(cachedAt.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('CachedCalendarEventsCompanion(')
..write('id: $id, ')
..write('title: $title, ')
..write('startDt: $startDt, ')
..write('endDt: $endDt, ')
..write('allDay: $allDay, ')
..write('description: $description, ')
..write('location: $location, ')
..write('color: $color, ')
..write('recurrence: $recurrence, ')
..write('projectId: $projectId, ')
..write('reminderMinutes: $reminderMinutes, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
}
class $CachedConversationsTable extends CachedConversations
with TableInfo<$CachedConversationsTable, CachedConversation> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$CachedConversationsTable(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,
);
static const VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
'title',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _createdAtMeta = const VerificationMeta(
'createdAt',
);
@override
late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(
'created_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _updatedAtMeta = const VerificationMeta(
'updatedAt',
);
@override
late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(
'updated_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _cachedAtMeta = const VerificationMeta(
'cachedAt',
);
@override
late final GeneratedColumn<DateTime> cachedAt = GeneratedColumn<DateTime>(
'cached_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
clientDefault: () => DateTime.now(),
);
@override
List<GeneratedColumn> get $columns => [
id,
title,
createdAt,
updatedAt,
cachedAt,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'cached_conversations';
@override
VerificationContext validateIntegrity(
Insertable<CachedConversation> 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('title')) {
context.handle(
_titleMeta,
title.isAcceptableOrUnknown(data['title']!, _titleMeta),
);
} else if (isInserting) {
context.missing(_titleMeta);
}
if (data.containsKey('created_at')) {
context.handle(
_createdAtMeta,
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
);
} else if (isInserting) {
context.missing(_createdAtMeta);
}
if (data.containsKey('updated_at')) {
context.handle(
_updatedAtMeta,
updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta),
);
} else if (isInserting) {
context.missing(_updatedAtMeta);
}
if (data.containsKey('cached_at')) {
context.handle(
_cachedAtMeta,
cachedAt.isAcceptableOrUnknown(data['cached_at']!, _cachedAtMeta),
);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
CachedConversation map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return CachedConversation(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
title: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}title'],
)!,
createdAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}created_at'],
)!,
updatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}updated_at'],
)!,
cachedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}cached_at'],
)!,
);
}
@override
$CachedConversationsTable createAlias(String alias) {
return $CachedConversationsTable(attachedDatabase, alias);
}
}
class CachedConversation extends DataClass
implements Insertable<CachedConversation> {
final int id;
final String title;
final DateTime createdAt;
final DateTime updatedAt;
final DateTime cachedAt;
const CachedConversation({
required this.id,
required this.title,
required this.createdAt,
required this.updatedAt,
required this.cachedAt,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['title'] = Variable<String>(title);
map['created_at'] = Variable<DateTime>(createdAt);
map['updated_at'] = Variable<DateTime>(updatedAt);
map['cached_at'] = Variable<DateTime>(cachedAt);
return map;
}
CachedConversationsCompanion toCompanion(bool nullToAbsent) {
return CachedConversationsCompanion(
id: Value(id),
title: Value(title),
createdAt: Value(createdAt),
updatedAt: Value(updatedAt),
cachedAt: Value(cachedAt),
);
}
factory CachedConversation.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return CachedConversation(
id: serializer.fromJson<int>(json['id']),
title: serializer.fromJson<String>(json['title']),
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
cachedAt: serializer.fromJson<DateTime>(json['cachedAt']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'title': serializer.toJson<String>(title),
'createdAt': serializer.toJson<DateTime>(createdAt),
'updatedAt': serializer.toJson<DateTime>(updatedAt),
'cachedAt': serializer.toJson<DateTime>(cachedAt),
};
}
CachedConversation copyWith({
int? id,
String? title,
DateTime? createdAt,
DateTime? updatedAt,
DateTime? cachedAt,
}) => CachedConversation(
id: id ?? this.id,
title: title ?? this.title,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
CachedConversation copyWithCompanion(CachedConversationsCompanion data) {
return CachedConversation(
id: data.id.present ? data.id.value : this.id,
title: data.title.present ? data.title.value : this.title,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
cachedAt: data.cachedAt.present ? data.cachedAt.value : this.cachedAt,
);
}
@override
String toString() {
return (StringBuffer('CachedConversation(')
..write('id: $id, ')
..write('title: $title, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(id, title, createdAt, updatedAt, cachedAt);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is CachedConversation &&
other.id == this.id &&
other.title == this.title &&
other.createdAt == this.createdAt &&
other.updatedAt == this.updatedAt &&
other.cachedAt == this.cachedAt);
}
class CachedConversationsCompanion extends UpdateCompanion<CachedConversation> {
final Value<int> id;
final Value<String> title;
final Value<DateTime> createdAt;
final Value<DateTime> updatedAt;
final Value<DateTime> cachedAt;
const CachedConversationsCompanion({
this.id = const Value.absent(),
this.title = const Value.absent(),
this.createdAt = const Value.absent(),
this.updatedAt = const Value.absent(),
this.cachedAt = const Value.absent(),
});
CachedConversationsCompanion.insert({
this.id = const Value.absent(),
required String title,
required DateTime createdAt,
required DateTime updatedAt,
this.cachedAt = const Value.absent(),
}) : title = Value(title),
createdAt = Value(createdAt),
updatedAt = Value(updatedAt);
static Insertable<CachedConversation> custom({
Expression<int>? id,
Expression<String>? title,
Expression<DateTime>? createdAt,
Expression<DateTime>? updatedAt,
Expression<DateTime>? cachedAt,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (title != null) 'title': title,
if (createdAt != null) 'created_at': createdAt,
if (updatedAt != null) 'updated_at': updatedAt,
if (cachedAt != null) 'cached_at': cachedAt,
});
}
CachedConversationsCompanion copyWith({
Value<int>? id,
Value<String>? title,
Value<DateTime>? createdAt,
Value<DateTime>? updatedAt,
Value<DateTime>? cachedAt,
}) {
return CachedConversationsCompanion(
id: id ?? this.id,
title: title ?? this.title,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
cachedAt: cachedAt ?? this.cachedAt,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (title.present) {
map['title'] = Variable<String>(title.value);
}
if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value);
}
if (updatedAt.present) {
map['updated_at'] = Variable<DateTime>(updatedAt.value);
}
if (cachedAt.present) {
map['cached_at'] = Variable<DateTime>(cachedAt.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('CachedConversationsCompanion(')
..write('id: $id, ')
..write('title: $title, ')
..write('createdAt: $createdAt, ')
..write('updatedAt: $updatedAt, ')
..write('cachedAt: $cachedAt')
..write(')'))
.toString();
}
}
class $SyncMetadataTable extends SyncMetadata
with TableInfo<$SyncMetadataTable, SyncMetadataData> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$SyncMetadataTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _domainMeta = const VerificationMeta('domain');
@override
late final GeneratedColumn<String> domain = GeneratedColumn<String>(
'domain',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _lastSyncedAtMeta = const VerificationMeta(
'lastSyncedAt',
);
@override
late final GeneratedColumn<DateTime> lastSyncedAt = GeneratedColumn<DateTime>(
'last_synced_at',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
@override
List<GeneratedColumn> get $columns => [domain, lastSyncedAt];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'sync_metadata';
@override
VerificationContext validateIntegrity(
Insertable<SyncMetadataData> instance, {
bool isInserting = false,
}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('domain')) {
context.handle(
_domainMeta,
domain.isAcceptableOrUnknown(data['domain']!, _domainMeta),
);
} else if (isInserting) {
context.missing(_domainMeta);
}
if (data.containsKey('last_synced_at')) {
context.handle(
_lastSyncedAtMeta,
lastSyncedAt.isAcceptableOrUnknown(
data['last_synced_at']!,
_lastSyncedAtMeta,
),
);
} else if (isInserting) {
context.missing(_lastSyncedAtMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {domain};
@override
SyncMetadataData map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return SyncMetadataData(
domain: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}domain'],
)!,
lastSyncedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}last_synced_at'],
)!,
);
}
@override
$SyncMetadataTable createAlias(String alias) {
return $SyncMetadataTable(attachedDatabase, alias);
}
}
class SyncMetadataData extends DataClass
implements Insertable<SyncMetadataData> {
final String domain;
final DateTime lastSyncedAt;
const SyncMetadataData({required this.domain, required this.lastSyncedAt});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['domain'] = Variable<String>(domain);
map['last_synced_at'] = Variable<DateTime>(lastSyncedAt);
return map;
}
SyncMetadataCompanion toCompanion(bool nullToAbsent) {
return SyncMetadataCompanion(
domain: Value(domain),
lastSyncedAt: Value(lastSyncedAt),
);
}
factory SyncMetadataData.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return SyncMetadataData(
domain: serializer.fromJson<String>(json['domain']),
lastSyncedAt: serializer.fromJson<DateTime>(json['lastSyncedAt']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'domain': serializer.toJson<String>(domain),
'lastSyncedAt': serializer.toJson<DateTime>(lastSyncedAt),
};
}
SyncMetadataData copyWith({String? domain, DateTime? lastSyncedAt}) =>
SyncMetadataData(
domain: domain ?? this.domain,
lastSyncedAt: lastSyncedAt ?? this.lastSyncedAt,
);
SyncMetadataData copyWithCompanion(SyncMetadataCompanion data) {
return SyncMetadataData(
domain: data.domain.present ? data.domain.value : this.domain,
lastSyncedAt: data.lastSyncedAt.present
? data.lastSyncedAt.value
: this.lastSyncedAt,
);
}
@override
String toString() {
return (StringBuffer('SyncMetadataData(')
..write('domain: $domain, ')
..write('lastSyncedAt: $lastSyncedAt')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(domain, lastSyncedAt);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is SyncMetadataData &&
other.domain == this.domain &&
other.lastSyncedAt == this.lastSyncedAt);
}
class SyncMetadataCompanion extends UpdateCompanion<SyncMetadataData> {
final Value<String> domain;
final Value<DateTime> lastSyncedAt;
final Value<int> rowid;
const SyncMetadataCompanion({
this.domain = const Value.absent(),
this.lastSyncedAt = const Value.absent(),
this.rowid = const Value.absent(),
});
SyncMetadataCompanion.insert({
required String domain,
required DateTime lastSyncedAt,
this.rowid = const Value.absent(),
}) : domain = Value(domain),
lastSyncedAt = Value(lastSyncedAt);
static Insertable<SyncMetadataData> custom({
Expression<String>? domain,
Expression<DateTime>? lastSyncedAt,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (domain != null) 'domain': domain,
if (lastSyncedAt != null) 'last_synced_at': lastSyncedAt,
if (rowid != null) 'rowid': rowid,
});
}
SyncMetadataCompanion copyWith({
Value<String>? domain,
Value<DateTime>? lastSyncedAt,
Value<int>? rowid,
}) {
return SyncMetadataCompanion(
domain: domain ?? this.domain,
lastSyncedAt: lastSyncedAt ?? this.lastSyncedAt,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (domain.present) {
map['domain'] = Variable<String>(domain.value);
}
if (lastSyncedAt.present) {
map['last_synced_at'] = Variable<DateTime>(lastSyncedAt.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('SyncMetadataCompanion(')
..write('domain: $domain, ')
..write('lastSyncedAt: $lastSyncedAt, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $PendingWritesTable extends PendingWrites
with TableInfo<$PendingWritesTable, PendingWrite> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$PendingWritesTable(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 _domainMeta = const VerificationMeta('domain');
@override
late final GeneratedColumn<String> domain = GeneratedColumn<String>(
'domain',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _verbMeta = const VerificationMeta('verb');
@override
late final GeneratedColumn<String> verb = GeneratedColumn<String>(
'verb',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _targetIdMeta = const VerificationMeta(
'targetId',
);
@override
late final GeneratedColumn<int> targetId = GeneratedColumn<int>(
'target_id',
aliasedName,
true,
type: DriftSqlType.int,
requiredDuringInsert: false,
);
static const VerificationMeta _tempIdMeta = const VerificationMeta('tempId');
@override
late final GeneratedColumn<int> tempId = GeneratedColumn<int>(
'temp_id',
aliasedName,
true,
type: DriftSqlType.int,
requiredDuringInsert: false,
);
static const VerificationMeta _payloadJsonMeta = const VerificationMeta(
'payloadJson',
);
@override
late final GeneratedColumn<String> payloadJson = GeneratedColumn<String>(
'payload_json',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultValue: const Constant('{}'),
);
static const VerificationMeta _baselineUpdatedAtMeta = const VerificationMeta(
'baselineUpdatedAt',
);
@override
late final GeneratedColumn<DateTime> baselineUpdatedAt =
GeneratedColumn<DateTime>(
'baseline_updated_at',
aliasedName,
true,
type: DriftSqlType.dateTime,
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,
clientDefault: () => DateTime.now(),
);
static const VerificationMeta _triesMeta = const VerificationMeta('tries');
@override
late final GeneratedColumn<int> tries = GeneratedColumn<int>(
'tries',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultValue: const Constant(0),
);
static const VerificationMeta _lastErrorMeta = const VerificationMeta(
'lastError',
);
@override
late final GeneratedColumn<String> lastError = GeneratedColumn<String>(
'last_error',
aliasedName,
true,
type: DriftSqlType.string,
requiredDuringInsert: false,
);
@override
List<GeneratedColumn> get $columns => [
id,
domain,
verb,
targetId,
tempId,
payloadJson,
baselineUpdatedAt,
createdAt,
tries,
lastError,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'pending_writes';
@override
VerificationContext validateIntegrity(
Insertable<PendingWrite> 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('domain')) {
context.handle(
_domainMeta,
domain.isAcceptableOrUnknown(data['domain']!, _domainMeta),
);
} else if (isInserting) {
context.missing(_domainMeta);
}
if (data.containsKey('verb')) {
context.handle(
_verbMeta,
verb.isAcceptableOrUnknown(data['verb']!, _verbMeta),
);
} else if (isInserting) {
context.missing(_verbMeta);
}
if (data.containsKey('target_id')) {
context.handle(
_targetIdMeta,
targetId.isAcceptableOrUnknown(data['target_id']!, _targetIdMeta),
);
}
if (data.containsKey('temp_id')) {
context.handle(
_tempIdMeta,
tempId.isAcceptableOrUnknown(data['temp_id']!, _tempIdMeta),
);
}
if (data.containsKey('payload_json')) {
context.handle(
_payloadJsonMeta,
payloadJson.isAcceptableOrUnknown(
data['payload_json']!,
_payloadJsonMeta,
),
);
}
if (data.containsKey('baseline_updated_at')) {
context.handle(
_baselineUpdatedAtMeta,
baselineUpdatedAt.isAcceptableOrUnknown(
data['baseline_updated_at']!,
_baselineUpdatedAtMeta,
),
);
}
if (data.containsKey('created_at')) {
context.handle(
_createdAtMeta,
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
);
}
if (data.containsKey('tries')) {
context.handle(
_triesMeta,
tries.isAcceptableOrUnknown(data['tries']!, _triesMeta),
);
}
if (data.containsKey('last_error')) {
context.handle(
_lastErrorMeta,
lastError.isAcceptableOrUnknown(data['last_error']!, _lastErrorMeta),
);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
PendingWrite map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return PendingWrite(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
domain: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}domain'],
)!,
verb: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}verb'],
)!,
targetId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}target_id'],
),
tempId: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}temp_id'],
),
payloadJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}payload_json'],
)!,
baselineUpdatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}baseline_updated_at'],
),
createdAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}created_at'],
)!,
tries: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}tries'],
)!,
lastError: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}last_error'],
),
);
}
@override
$PendingWritesTable createAlias(String alias) {
return $PendingWritesTable(attachedDatabase, alias);
}
}
class PendingWrite extends DataClass implements Insertable<PendingWrite> {
final int id;
final String domain;
final String verb;
final int? targetId;
final int? tempId;
final String payloadJson;
final DateTime? baselineUpdatedAt;
final DateTime createdAt;
final int tries;
final String? lastError;
const PendingWrite({
required this.id,
required this.domain,
required this.verb,
this.targetId,
this.tempId,
required this.payloadJson,
this.baselineUpdatedAt,
required this.createdAt,
required this.tries,
this.lastError,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['domain'] = Variable<String>(domain);
map['verb'] = Variable<String>(verb);
if (!nullToAbsent || targetId != null) {
map['target_id'] = Variable<int>(targetId);
}
if (!nullToAbsent || tempId != null) {
map['temp_id'] = Variable<int>(tempId);
}
map['payload_json'] = Variable<String>(payloadJson);
if (!nullToAbsent || baselineUpdatedAt != null) {
map['baseline_updated_at'] = Variable<DateTime>(baselineUpdatedAt);
}
map['created_at'] = Variable<DateTime>(createdAt);
map['tries'] = Variable<int>(tries);
if (!nullToAbsent || lastError != null) {
map['last_error'] = Variable<String>(lastError);
}
return map;
}
PendingWritesCompanion toCompanion(bool nullToAbsent) {
return PendingWritesCompanion(
id: Value(id),
domain: Value(domain),
verb: Value(verb),
targetId: targetId == null && nullToAbsent
? const Value.absent()
: Value(targetId),
tempId: tempId == null && nullToAbsent
? const Value.absent()
: Value(tempId),
payloadJson: Value(payloadJson),
baselineUpdatedAt: baselineUpdatedAt == null && nullToAbsent
? const Value.absent()
: Value(baselineUpdatedAt),
createdAt: Value(createdAt),
tries: Value(tries),
lastError: lastError == null && nullToAbsent
? const Value.absent()
: Value(lastError),
);
}
factory PendingWrite.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return PendingWrite(
id: serializer.fromJson<int>(json['id']),
domain: serializer.fromJson<String>(json['domain']),
verb: serializer.fromJson<String>(json['verb']),
targetId: serializer.fromJson<int?>(json['targetId']),
tempId: serializer.fromJson<int?>(json['tempId']),
payloadJson: serializer.fromJson<String>(json['payloadJson']),
baselineUpdatedAt: serializer.fromJson<DateTime?>(
json['baselineUpdatedAt'],
),
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
tries: serializer.fromJson<int>(json['tries']),
lastError: serializer.fromJson<String?>(json['lastError']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'domain': serializer.toJson<String>(domain),
'verb': serializer.toJson<String>(verb),
'targetId': serializer.toJson<int?>(targetId),
'tempId': serializer.toJson<int?>(tempId),
'payloadJson': serializer.toJson<String>(payloadJson),
'baselineUpdatedAt': serializer.toJson<DateTime?>(baselineUpdatedAt),
'createdAt': serializer.toJson<DateTime>(createdAt),
'tries': serializer.toJson<int>(tries),
'lastError': serializer.toJson<String?>(lastError),
};
}
PendingWrite copyWith({
int? id,
String? domain,
String? verb,
Value<int?> targetId = const Value.absent(),
Value<int?> tempId = const Value.absent(),
String? payloadJson,
Value<DateTime?> baselineUpdatedAt = const Value.absent(),
DateTime? createdAt,
int? tries,
Value<String?> lastError = const Value.absent(),
}) => PendingWrite(
id: id ?? this.id,
domain: domain ?? this.domain,
verb: verb ?? this.verb,
targetId: targetId.present ? targetId.value : this.targetId,
tempId: tempId.present ? tempId.value : this.tempId,
payloadJson: payloadJson ?? this.payloadJson,
baselineUpdatedAt: baselineUpdatedAt.present
? baselineUpdatedAt.value
: this.baselineUpdatedAt,
createdAt: createdAt ?? this.createdAt,
tries: tries ?? this.tries,
lastError: lastError.present ? lastError.value : this.lastError,
);
PendingWrite copyWithCompanion(PendingWritesCompanion data) {
return PendingWrite(
id: data.id.present ? data.id.value : this.id,
domain: data.domain.present ? data.domain.value : this.domain,
verb: data.verb.present ? data.verb.value : this.verb,
targetId: data.targetId.present ? data.targetId.value : this.targetId,
tempId: data.tempId.present ? data.tempId.value : this.tempId,
payloadJson: data.payloadJson.present
? data.payloadJson.value
: this.payloadJson,
baselineUpdatedAt: data.baselineUpdatedAt.present
? data.baselineUpdatedAt.value
: this.baselineUpdatedAt,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
tries: data.tries.present ? data.tries.value : this.tries,
lastError: data.lastError.present ? data.lastError.value : this.lastError,
);
}
@override
String toString() {
return (StringBuffer('PendingWrite(')
..write('id: $id, ')
..write('domain: $domain, ')
..write('verb: $verb, ')
..write('targetId: $targetId, ')
..write('tempId: $tempId, ')
..write('payloadJson: $payloadJson, ')
..write('baselineUpdatedAt: $baselineUpdatedAt, ')
..write('createdAt: $createdAt, ')
..write('tries: $tries, ')
..write('lastError: $lastError')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
domain,
verb,
targetId,
tempId,
payloadJson,
baselineUpdatedAt,
createdAt,
tries,
lastError,
);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is PendingWrite &&
other.id == this.id &&
other.domain == this.domain &&
other.verb == this.verb &&
other.targetId == this.targetId &&
other.tempId == this.tempId &&
other.payloadJson == this.payloadJson &&
other.baselineUpdatedAt == this.baselineUpdatedAt &&
other.createdAt == this.createdAt &&
other.tries == this.tries &&
other.lastError == this.lastError);
}
class PendingWritesCompanion extends UpdateCompanion<PendingWrite> {
final Value<int> id;
final Value<String> domain;
final Value<String> verb;
final Value<int?> targetId;
final Value<int?> tempId;
final Value<String> payloadJson;
final Value<DateTime?> baselineUpdatedAt;
final Value<DateTime> createdAt;
final Value<int> tries;
final Value<String?> lastError;
const PendingWritesCompanion({
this.id = const Value.absent(),
this.domain = const Value.absent(),
this.verb = const Value.absent(),
this.targetId = const Value.absent(),
this.tempId = const Value.absent(),
this.payloadJson = const Value.absent(),
this.baselineUpdatedAt = const Value.absent(),
this.createdAt = const Value.absent(),
this.tries = const Value.absent(),
this.lastError = const Value.absent(),
});
PendingWritesCompanion.insert({
this.id = const Value.absent(),
required String domain,
required String verb,
this.targetId = const Value.absent(),
this.tempId = const Value.absent(),
this.payloadJson = const Value.absent(),
this.baselineUpdatedAt = const Value.absent(),
this.createdAt = const Value.absent(),
this.tries = const Value.absent(),
this.lastError = const Value.absent(),
}) : domain = Value(domain),
verb = Value(verb);
static Insertable<PendingWrite> custom({
Expression<int>? id,
Expression<String>? domain,
Expression<String>? verb,
Expression<int>? targetId,
Expression<int>? tempId,
Expression<String>? payloadJson,
Expression<DateTime>? baselineUpdatedAt,
Expression<DateTime>? createdAt,
Expression<int>? tries,
Expression<String>? lastError,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (domain != null) 'domain': domain,
if (verb != null) 'verb': verb,
if (targetId != null) 'target_id': targetId,
if (tempId != null) 'temp_id': tempId,
if (payloadJson != null) 'payload_json': payloadJson,
if (baselineUpdatedAt != null) 'baseline_updated_at': baselineUpdatedAt,
if (createdAt != null) 'created_at': createdAt,
if (tries != null) 'tries': tries,
if (lastError != null) 'last_error': lastError,
});
}
PendingWritesCompanion copyWith({
Value<int>? id,
Value<String>? domain,
Value<String>? verb,
Value<int?>? targetId,
Value<int?>? tempId,
Value<String>? payloadJson,
Value<DateTime?>? baselineUpdatedAt,
Value<DateTime>? createdAt,
Value<int>? tries,
Value<String?>? lastError,
}) {
return PendingWritesCompanion(
id: id ?? this.id,
domain: domain ?? this.domain,
verb: verb ?? this.verb,
targetId: targetId ?? this.targetId,
tempId: tempId ?? this.tempId,
payloadJson: payloadJson ?? this.payloadJson,
baselineUpdatedAt: baselineUpdatedAt ?? this.baselineUpdatedAt,
createdAt: createdAt ?? this.createdAt,
tries: tries ?? this.tries,
lastError: lastError ?? this.lastError,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (domain.present) {
map['domain'] = Variable<String>(domain.value);
}
if (verb.present) {
map['verb'] = Variable<String>(verb.value);
}
if (targetId.present) {
map['target_id'] = Variable<int>(targetId.value);
}
if (tempId.present) {
map['temp_id'] = Variable<int>(tempId.value);
}
if (payloadJson.present) {
map['payload_json'] = Variable<String>(payloadJson.value);
}
if (baselineUpdatedAt.present) {
map['baseline_updated_at'] = Variable<DateTime>(baselineUpdatedAt.value);
}
if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value);
}
if (tries.present) {
map['tries'] = Variable<int>(tries.value);
}
if (lastError.present) {
map['last_error'] = Variable<String>(lastError.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('PendingWritesCompanion(')
..write('id: $id, ')
..write('domain: $domain, ')
..write('verb: $verb, ')
..write('targetId: $targetId, ')
..write('tempId: $tempId, ')
..write('payloadJson: $payloadJson, ')
..write('baselineUpdatedAt: $baselineUpdatedAt, ')
..write('createdAt: $createdAt, ')
..write('tries: $tries, ')
..write('lastError: $lastError')
..write(')'))
.toString();
}
}
abstract class _$FabledDatabase extends GeneratedDatabase {
_$FabledDatabase(QueryExecutor e) : super(e);
$FabledDatabaseManager get managers => $FabledDatabaseManager(this);
late final $CachedNotesTable cachedNotes = $CachedNotesTable(this);
late final $CachedTasksTable cachedTasks = $CachedTasksTable(this);
late final $CachedProjectsTable cachedProjects = $CachedProjectsTable(this);
late final $CachedMilestonesTable cachedMilestones = $CachedMilestonesTable(
this,
);
late final $CachedCalendarEventsTable cachedCalendarEvents =
$CachedCalendarEventsTable(this);
late final $CachedConversationsTable cachedConversations =
$CachedConversationsTable(this);
late final $SyncMetadataTable syncMetadata = $SyncMetadataTable(this);
late final $PendingWritesTable pendingWrites = $PendingWritesTable(this);
@override
Iterable<TableInfo<Table, Object?>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override
List<DatabaseSchemaEntity> get allSchemaEntities => [
cachedNotes,
cachedTasks,
cachedProjects,
cachedMilestones,
cachedCalendarEvents,
cachedConversations,
syncMetadata,
pendingWrites,
];
}
typedef $$CachedNotesTableCreateCompanionBuilder =
CachedNotesCompanion Function({
Value<int> id,
required String title,
required String body,
Value<String> tagsJson,
Value<String> noteType,
Value<int?> projectId,
Value<int?> milestoneId,
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt,
});
typedef $$CachedNotesTableUpdateCompanionBuilder =
CachedNotesCompanion Function({
Value<int> id,
Value<String> title,
Value<String> body,
Value<String> tagsJson,
Value<String> noteType,
Value<int?> projectId,
Value<int?> milestoneId,
Value<DateTime> createdAt,
Value<DateTime> updatedAt,
Value<DateTime> cachedAt,
});
class $$CachedNotesTableFilterComposer
extends Composer<_$FabledDatabase, $CachedNotesTable> {
$$CachedNotesTableFilterComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get body => $composableBuilder(
column: $table.body,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get tagsJson => $composableBuilder(
column: $table.tagsJson,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get noteType => $composableBuilder(
column: $table.noteType,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get projectId => $composableBuilder(
column: $table.projectId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get milestoneId => $composableBuilder(
column: $table.milestoneId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnFilters(column),
);
}
class $$CachedNotesTableOrderingComposer
extends Composer<_$FabledDatabase, $CachedNotesTable> {
$$CachedNotesTableOrderingComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get body => $composableBuilder(
column: $table.body,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get tagsJson => $composableBuilder(
column: $table.tagsJson,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get noteType => $composableBuilder(
column: $table.noteType,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get projectId => $composableBuilder(
column: $table.projectId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get milestoneId => $composableBuilder(
column: $table.milestoneId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnOrderings(column),
);
}
class $$CachedNotesTableAnnotationComposer
extends Composer<_$FabledDatabase, $CachedNotesTable> {
$$CachedNotesTableAnnotationComposer({
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 title =>
$composableBuilder(column: $table.title, builder: (column) => column);
GeneratedColumn<String> get body =>
$composableBuilder(column: $table.body, builder: (column) => column);
GeneratedColumn<String> get tagsJson =>
$composableBuilder(column: $table.tagsJson, builder: (column) => column);
GeneratedColumn<String> get noteType =>
$composableBuilder(column: $table.noteType, builder: (column) => column);
GeneratedColumn<int> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<int> get milestoneId => $composableBuilder(
column: $table.milestoneId,
builder: (column) => column,
);
GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAt =>
$composableBuilder(column: $table.updatedAt, builder: (column) => column);
GeneratedColumn<DateTime> get cachedAt =>
$composableBuilder(column: $table.cachedAt, builder: (column) => column);
}
class $$CachedNotesTableTableManager
extends
RootTableManager<
_$FabledDatabase,
$CachedNotesTable,
CachedNote,
$$CachedNotesTableFilterComposer,
$$CachedNotesTableOrderingComposer,
$$CachedNotesTableAnnotationComposer,
$$CachedNotesTableCreateCompanionBuilder,
$$CachedNotesTableUpdateCompanionBuilder,
(
CachedNote,
BaseReferences<_$FabledDatabase, $CachedNotesTable, CachedNote>,
),
CachedNote,
PrefetchHooks Function()
> {
$$CachedNotesTableTableManager(_$FabledDatabase db, $CachedNotesTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$CachedNotesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$CachedNotesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$CachedNotesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> title = const Value.absent(),
Value<String> body = const Value.absent(),
Value<String> tagsJson = const Value.absent(),
Value<String> noteType = const Value.absent(),
Value<int?> projectId = const Value.absent(),
Value<int?> milestoneId = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<DateTime> updatedAt = const Value.absent(),
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedNotesCompanion(
id: id,
title: title,
body: body,
tagsJson: tagsJson,
noteType: noteType,
projectId: projectId,
milestoneId: milestoneId,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String title,
required String body,
Value<String> tagsJson = const Value.absent(),
Value<String> noteType = const Value.absent(),
Value<int?> projectId = const Value.absent(),
Value<int?> milestoneId = const Value.absent(),
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedNotesCompanion.insert(
id: id,
title: title,
body: body,
tagsJson: tagsJson,
noteType: noteType,
projectId: projectId,
milestoneId: milestoneId,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$CachedNotesTableProcessedTableManager =
ProcessedTableManager<
_$FabledDatabase,
$CachedNotesTable,
CachedNote,
$$CachedNotesTableFilterComposer,
$$CachedNotesTableOrderingComposer,
$$CachedNotesTableAnnotationComposer,
$$CachedNotesTableCreateCompanionBuilder,
$$CachedNotesTableUpdateCompanionBuilder,
(
CachedNote,
BaseReferences<_$FabledDatabase, $CachedNotesTable, CachedNote>,
),
CachedNote,
PrefetchHooks Function()
>;
typedef $$CachedTasksTableCreateCompanionBuilder =
CachedTasksCompanion Function({
Value<int> id,
required String title,
Value<String?> description,
required String status,
required String priority,
Value<DateTime?> dueDate,
Value<int?> projectId,
Value<int?> milestoneId,
Value<int?> parentId,
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt,
});
typedef $$CachedTasksTableUpdateCompanionBuilder =
CachedTasksCompanion Function({
Value<int> id,
Value<String> title,
Value<String?> description,
Value<String> status,
Value<String> priority,
Value<DateTime?> dueDate,
Value<int?> projectId,
Value<int?> milestoneId,
Value<int?> parentId,
Value<DateTime> createdAt,
Value<DateTime> updatedAt,
Value<DateTime> cachedAt,
});
class $$CachedTasksTableFilterComposer
extends Composer<_$FabledDatabase, $CachedTasksTable> {
$$CachedTasksTableFilterComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get status => $composableBuilder(
column: $table.status,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get priority => $composableBuilder(
column: $table.priority,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get dueDate => $composableBuilder(
column: $table.dueDate,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get projectId => $composableBuilder(
column: $table.projectId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get milestoneId => $composableBuilder(
column: $table.milestoneId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get parentId => $composableBuilder(
column: $table.parentId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnFilters(column),
);
}
class $$CachedTasksTableOrderingComposer
extends Composer<_$FabledDatabase, $CachedTasksTable> {
$$CachedTasksTableOrderingComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get status => $composableBuilder(
column: $table.status,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get priority => $composableBuilder(
column: $table.priority,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get dueDate => $composableBuilder(
column: $table.dueDate,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get projectId => $composableBuilder(
column: $table.projectId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get milestoneId => $composableBuilder(
column: $table.milestoneId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get parentId => $composableBuilder(
column: $table.parentId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnOrderings(column),
);
}
class $$CachedTasksTableAnnotationComposer
extends Composer<_$FabledDatabase, $CachedTasksTable> {
$$CachedTasksTableAnnotationComposer({
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 title =>
$composableBuilder(column: $table.title, builder: (column) => column);
GeneratedColumn<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => column,
);
GeneratedColumn<String> get status =>
$composableBuilder(column: $table.status, builder: (column) => column);
GeneratedColumn<String> get priority =>
$composableBuilder(column: $table.priority, builder: (column) => column);
GeneratedColumn<DateTime> get dueDate =>
$composableBuilder(column: $table.dueDate, builder: (column) => column);
GeneratedColumn<int> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<int> get milestoneId => $composableBuilder(
column: $table.milestoneId,
builder: (column) => column,
);
GeneratedColumn<int> get parentId =>
$composableBuilder(column: $table.parentId, builder: (column) => column);
GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAt =>
$composableBuilder(column: $table.updatedAt, builder: (column) => column);
GeneratedColumn<DateTime> get cachedAt =>
$composableBuilder(column: $table.cachedAt, builder: (column) => column);
}
class $$CachedTasksTableTableManager
extends
RootTableManager<
_$FabledDatabase,
$CachedTasksTable,
CachedTask,
$$CachedTasksTableFilterComposer,
$$CachedTasksTableOrderingComposer,
$$CachedTasksTableAnnotationComposer,
$$CachedTasksTableCreateCompanionBuilder,
$$CachedTasksTableUpdateCompanionBuilder,
(
CachedTask,
BaseReferences<_$FabledDatabase, $CachedTasksTable, CachedTask>,
),
CachedTask,
PrefetchHooks Function()
> {
$$CachedTasksTableTableManager(_$FabledDatabase db, $CachedTasksTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$CachedTasksTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$CachedTasksTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$CachedTasksTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> title = const Value.absent(),
Value<String?> description = const Value.absent(),
Value<String> status = const Value.absent(),
Value<String> priority = const Value.absent(),
Value<DateTime?> dueDate = const Value.absent(),
Value<int?> projectId = const Value.absent(),
Value<int?> milestoneId = const Value.absent(),
Value<int?> parentId = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<DateTime> updatedAt = const Value.absent(),
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedTasksCompanion(
id: id,
title: title,
description: description,
status: status,
priority: priority,
dueDate: dueDate,
projectId: projectId,
milestoneId: milestoneId,
parentId: parentId,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String title,
Value<String?> description = const Value.absent(),
required String status,
required String priority,
Value<DateTime?> dueDate = const Value.absent(),
Value<int?> projectId = const Value.absent(),
Value<int?> milestoneId = const Value.absent(),
Value<int?> parentId = const Value.absent(),
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedTasksCompanion.insert(
id: id,
title: title,
description: description,
status: status,
priority: priority,
dueDate: dueDate,
projectId: projectId,
milestoneId: milestoneId,
parentId: parentId,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$CachedTasksTableProcessedTableManager =
ProcessedTableManager<
_$FabledDatabase,
$CachedTasksTable,
CachedTask,
$$CachedTasksTableFilterComposer,
$$CachedTasksTableOrderingComposer,
$$CachedTasksTableAnnotationComposer,
$$CachedTasksTableCreateCompanionBuilder,
$$CachedTasksTableUpdateCompanionBuilder,
(
CachedTask,
BaseReferences<_$FabledDatabase, $CachedTasksTable, CachedTask>,
),
CachedTask,
PrefetchHooks Function()
>;
typedef $$CachedProjectsTableCreateCompanionBuilder =
CachedProjectsCompanion Function({
Value<int> id,
required String title,
Value<String?> description,
Value<String?> goal,
required String status,
Value<String?> color,
Value<String?> autoSummary,
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt,
});
typedef $$CachedProjectsTableUpdateCompanionBuilder =
CachedProjectsCompanion Function({
Value<int> id,
Value<String> title,
Value<String?> description,
Value<String?> goal,
Value<String> status,
Value<String?> color,
Value<String?> autoSummary,
Value<DateTime> createdAt,
Value<DateTime> updatedAt,
Value<DateTime> cachedAt,
});
class $$CachedProjectsTableFilterComposer
extends Composer<_$FabledDatabase, $CachedProjectsTable> {
$$CachedProjectsTableFilterComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get goal => $composableBuilder(
column: $table.goal,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get status => $composableBuilder(
column: $table.status,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get color => $composableBuilder(
column: $table.color,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get autoSummary => $composableBuilder(
column: $table.autoSummary,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnFilters(column),
);
}
class $$CachedProjectsTableOrderingComposer
extends Composer<_$FabledDatabase, $CachedProjectsTable> {
$$CachedProjectsTableOrderingComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get goal => $composableBuilder(
column: $table.goal,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get status => $composableBuilder(
column: $table.status,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get color => $composableBuilder(
column: $table.color,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get autoSummary => $composableBuilder(
column: $table.autoSummary,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnOrderings(column),
);
}
class $$CachedProjectsTableAnnotationComposer
extends Composer<_$FabledDatabase, $CachedProjectsTable> {
$$CachedProjectsTableAnnotationComposer({
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 title =>
$composableBuilder(column: $table.title, builder: (column) => column);
GeneratedColumn<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => column,
);
GeneratedColumn<String> get goal =>
$composableBuilder(column: $table.goal, builder: (column) => column);
GeneratedColumn<String> get status =>
$composableBuilder(column: $table.status, builder: (column) => column);
GeneratedColumn<String> get color =>
$composableBuilder(column: $table.color, builder: (column) => column);
GeneratedColumn<String> get autoSummary => $composableBuilder(
column: $table.autoSummary,
builder: (column) => column,
);
GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAt =>
$composableBuilder(column: $table.updatedAt, builder: (column) => column);
GeneratedColumn<DateTime> get cachedAt =>
$composableBuilder(column: $table.cachedAt, builder: (column) => column);
}
class $$CachedProjectsTableTableManager
extends
RootTableManager<
_$FabledDatabase,
$CachedProjectsTable,
CachedProject,
$$CachedProjectsTableFilterComposer,
$$CachedProjectsTableOrderingComposer,
$$CachedProjectsTableAnnotationComposer,
$$CachedProjectsTableCreateCompanionBuilder,
$$CachedProjectsTableUpdateCompanionBuilder,
(
CachedProject,
BaseReferences<
_$FabledDatabase,
$CachedProjectsTable,
CachedProject
>,
),
CachedProject,
PrefetchHooks Function()
> {
$$CachedProjectsTableTableManager(
_$FabledDatabase db,
$CachedProjectsTable table,
) : super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$CachedProjectsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$CachedProjectsTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$CachedProjectsTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> title = const Value.absent(),
Value<String?> description = const Value.absent(),
Value<String?> goal = const Value.absent(),
Value<String> status = const Value.absent(),
Value<String?> color = const Value.absent(),
Value<String?> autoSummary = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<DateTime> updatedAt = const Value.absent(),
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedProjectsCompanion(
id: id,
title: title,
description: description,
goal: goal,
status: status,
color: color,
autoSummary: autoSummary,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String title,
Value<String?> description = const Value.absent(),
Value<String?> goal = const Value.absent(),
required String status,
Value<String?> color = const Value.absent(),
Value<String?> autoSummary = const Value.absent(),
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedProjectsCompanion.insert(
id: id,
title: title,
description: description,
goal: goal,
status: status,
color: color,
autoSummary: autoSummary,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$CachedProjectsTableProcessedTableManager =
ProcessedTableManager<
_$FabledDatabase,
$CachedProjectsTable,
CachedProject,
$$CachedProjectsTableFilterComposer,
$$CachedProjectsTableOrderingComposer,
$$CachedProjectsTableAnnotationComposer,
$$CachedProjectsTableCreateCompanionBuilder,
$$CachedProjectsTableUpdateCompanionBuilder,
(
CachedProject,
BaseReferences<_$FabledDatabase, $CachedProjectsTable, CachedProject>,
),
CachedProject,
PrefetchHooks Function()
>;
typedef $$CachedMilestonesTableCreateCompanionBuilder =
CachedMilestonesCompanion Function({
Value<int> id,
required int projectId,
required String title,
Value<String?> description,
required String status,
Value<int> orderIndex,
Value<int> total,
Value<int> completed,
Value<double> pct,
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt,
});
typedef $$CachedMilestonesTableUpdateCompanionBuilder =
CachedMilestonesCompanion Function({
Value<int> id,
Value<int> projectId,
Value<String> title,
Value<String?> description,
Value<String> status,
Value<int> orderIndex,
Value<int> total,
Value<int> completed,
Value<double> pct,
Value<DateTime> createdAt,
Value<DateTime> updatedAt,
Value<DateTime> cachedAt,
});
class $$CachedMilestonesTableFilterComposer
extends Composer<_$FabledDatabase, $CachedMilestonesTable> {
$$CachedMilestonesTableFilterComposer({
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<int> get projectId => $composableBuilder(
column: $table.projectId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get status => $composableBuilder(
column: $table.status,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get orderIndex => $composableBuilder(
column: $table.orderIndex,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get total => $composableBuilder(
column: $table.total,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get completed => $composableBuilder(
column: $table.completed,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<double> get pct => $composableBuilder(
column: $table.pct,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnFilters(column),
);
}
class $$CachedMilestonesTableOrderingComposer
extends Composer<_$FabledDatabase, $CachedMilestonesTable> {
$$CachedMilestonesTableOrderingComposer({
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<int> get projectId => $composableBuilder(
column: $table.projectId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get status => $composableBuilder(
column: $table.status,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get orderIndex => $composableBuilder(
column: $table.orderIndex,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get total => $composableBuilder(
column: $table.total,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get completed => $composableBuilder(
column: $table.completed,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<double> get pct => $composableBuilder(
column: $table.pct,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnOrderings(column),
);
}
class $$CachedMilestonesTableAnnotationComposer
extends Composer<_$FabledDatabase, $CachedMilestonesTable> {
$$CachedMilestonesTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<int> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<int> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<String> get title =>
$composableBuilder(column: $table.title, builder: (column) => column);
GeneratedColumn<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => column,
);
GeneratedColumn<String> get status =>
$composableBuilder(column: $table.status, builder: (column) => column);
GeneratedColumn<int> get orderIndex => $composableBuilder(
column: $table.orderIndex,
builder: (column) => column,
);
GeneratedColumn<int> get total =>
$composableBuilder(column: $table.total, builder: (column) => column);
GeneratedColumn<int> get completed =>
$composableBuilder(column: $table.completed, builder: (column) => column);
GeneratedColumn<double> get pct =>
$composableBuilder(column: $table.pct, builder: (column) => column);
GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAt =>
$composableBuilder(column: $table.updatedAt, builder: (column) => column);
GeneratedColumn<DateTime> get cachedAt =>
$composableBuilder(column: $table.cachedAt, builder: (column) => column);
}
class $$CachedMilestonesTableTableManager
extends
RootTableManager<
_$FabledDatabase,
$CachedMilestonesTable,
CachedMilestone,
$$CachedMilestonesTableFilterComposer,
$$CachedMilestonesTableOrderingComposer,
$$CachedMilestonesTableAnnotationComposer,
$$CachedMilestonesTableCreateCompanionBuilder,
$$CachedMilestonesTableUpdateCompanionBuilder,
(
CachedMilestone,
BaseReferences<
_$FabledDatabase,
$CachedMilestonesTable,
CachedMilestone
>,
),
CachedMilestone,
PrefetchHooks Function()
> {
$$CachedMilestonesTableTableManager(
_$FabledDatabase db,
$CachedMilestonesTable table,
) : super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$CachedMilestonesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$CachedMilestonesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$CachedMilestonesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<int> projectId = const Value.absent(),
Value<String> title = const Value.absent(),
Value<String?> description = const Value.absent(),
Value<String> status = const Value.absent(),
Value<int> orderIndex = const Value.absent(),
Value<int> total = const Value.absent(),
Value<int> completed = const Value.absent(),
Value<double> pct = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<DateTime> updatedAt = const Value.absent(),
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedMilestonesCompanion(
id: id,
projectId: projectId,
title: title,
description: description,
status: status,
orderIndex: orderIndex,
total: total,
completed: completed,
pct: pct,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required int projectId,
required String title,
Value<String?> description = const Value.absent(),
required String status,
Value<int> orderIndex = const Value.absent(),
Value<int> total = const Value.absent(),
Value<int> completed = const Value.absent(),
Value<double> pct = const Value.absent(),
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedMilestonesCompanion.insert(
id: id,
projectId: projectId,
title: title,
description: description,
status: status,
orderIndex: orderIndex,
total: total,
completed: completed,
pct: pct,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$CachedMilestonesTableProcessedTableManager =
ProcessedTableManager<
_$FabledDatabase,
$CachedMilestonesTable,
CachedMilestone,
$$CachedMilestonesTableFilterComposer,
$$CachedMilestonesTableOrderingComposer,
$$CachedMilestonesTableAnnotationComposer,
$$CachedMilestonesTableCreateCompanionBuilder,
$$CachedMilestonesTableUpdateCompanionBuilder,
(
CachedMilestone,
BaseReferences<
_$FabledDatabase,
$CachedMilestonesTable,
CachedMilestone
>,
),
CachedMilestone,
PrefetchHooks Function()
>;
typedef $$CachedCalendarEventsTableCreateCompanionBuilder =
CachedCalendarEventsCompanion Function({
Value<int> id,
required String title,
required DateTime startDt,
Value<DateTime?> endDt,
Value<bool> allDay,
Value<String> description,
Value<String> location,
Value<String> color,
Value<String?> recurrence,
Value<int?> projectId,
Value<int?> reminderMinutes,
Value<DateTime> cachedAt,
});
typedef $$CachedCalendarEventsTableUpdateCompanionBuilder =
CachedCalendarEventsCompanion Function({
Value<int> id,
Value<String> title,
Value<DateTime> startDt,
Value<DateTime?> endDt,
Value<bool> allDay,
Value<String> description,
Value<String> location,
Value<String> color,
Value<String?> recurrence,
Value<int?> projectId,
Value<int?> reminderMinutes,
Value<DateTime> cachedAt,
});
class $$CachedCalendarEventsTableFilterComposer
extends Composer<_$FabledDatabase, $CachedCalendarEventsTable> {
$$CachedCalendarEventsTableFilterComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get startDt => $composableBuilder(
column: $table.startDt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get endDt => $composableBuilder(
column: $table.endDt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<bool> get allDay => $composableBuilder(
column: $table.allDay,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get location => $composableBuilder(
column: $table.location,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get color => $composableBuilder(
column: $table.color,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get recurrence => $composableBuilder(
column: $table.recurrence,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get projectId => $composableBuilder(
column: $table.projectId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get reminderMinutes => $composableBuilder(
column: $table.reminderMinutes,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnFilters(column),
);
}
class $$CachedCalendarEventsTableOrderingComposer
extends Composer<_$FabledDatabase, $CachedCalendarEventsTable> {
$$CachedCalendarEventsTableOrderingComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get startDt => $composableBuilder(
column: $table.startDt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get endDt => $composableBuilder(
column: $table.endDt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<bool> get allDay => $composableBuilder(
column: $table.allDay,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get location => $composableBuilder(
column: $table.location,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get color => $composableBuilder(
column: $table.color,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get recurrence => $composableBuilder(
column: $table.recurrence,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get projectId => $composableBuilder(
column: $table.projectId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get reminderMinutes => $composableBuilder(
column: $table.reminderMinutes,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnOrderings(column),
);
}
class $$CachedCalendarEventsTableAnnotationComposer
extends Composer<_$FabledDatabase, $CachedCalendarEventsTable> {
$$CachedCalendarEventsTableAnnotationComposer({
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 title =>
$composableBuilder(column: $table.title, builder: (column) => column);
GeneratedColumn<DateTime> get startDt =>
$composableBuilder(column: $table.startDt, builder: (column) => column);
GeneratedColumn<DateTime> get endDt =>
$composableBuilder(column: $table.endDt, builder: (column) => column);
GeneratedColumn<bool> get allDay =>
$composableBuilder(column: $table.allDay, builder: (column) => column);
GeneratedColumn<String> get description => $composableBuilder(
column: $table.description,
builder: (column) => column,
);
GeneratedColumn<String> get location =>
$composableBuilder(column: $table.location, builder: (column) => column);
GeneratedColumn<String> get color =>
$composableBuilder(column: $table.color, builder: (column) => column);
GeneratedColumn<String> get recurrence => $composableBuilder(
column: $table.recurrence,
builder: (column) => column,
);
GeneratedColumn<int> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<int> get reminderMinutes => $composableBuilder(
column: $table.reminderMinutes,
builder: (column) => column,
);
GeneratedColumn<DateTime> get cachedAt =>
$composableBuilder(column: $table.cachedAt, builder: (column) => column);
}
class $$CachedCalendarEventsTableTableManager
extends
RootTableManager<
_$FabledDatabase,
$CachedCalendarEventsTable,
CachedCalendarEvent,
$$CachedCalendarEventsTableFilterComposer,
$$CachedCalendarEventsTableOrderingComposer,
$$CachedCalendarEventsTableAnnotationComposer,
$$CachedCalendarEventsTableCreateCompanionBuilder,
$$CachedCalendarEventsTableUpdateCompanionBuilder,
(
CachedCalendarEvent,
BaseReferences<
_$FabledDatabase,
$CachedCalendarEventsTable,
CachedCalendarEvent
>,
),
CachedCalendarEvent,
PrefetchHooks Function()
> {
$$CachedCalendarEventsTableTableManager(
_$FabledDatabase db,
$CachedCalendarEventsTable table,
) : super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$CachedCalendarEventsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$CachedCalendarEventsTableOrderingComposer(
$db: db,
$table: table,
),
createComputedFieldComposer: () =>
$$CachedCalendarEventsTableAnnotationComposer(
$db: db,
$table: table,
),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> title = const Value.absent(),
Value<DateTime> startDt = const Value.absent(),
Value<DateTime?> endDt = const Value.absent(),
Value<bool> allDay = const Value.absent(),
Value<String> description = const Value.absent(),
Value<String> location = const Value.absent(),
Value<String> color = const Value.absent(),
Value<String?> recurrence = const Value.absent(),
Value<int?> projectId = const Value.absent(),
Value<int?> reminderMinutes = const Value.absent(),
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedCalendarEventsCompanion(
id: id,
title: title,
startDt: startDt,
endDt: endDt,
allDay: allDay,
description: description,
location: location,
color: color,
recurrence: recurrence,
projectId: projectId,
reminderMinutes: reminderMinutes,
cachedAt: cachedAt,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String title,
required DateTime startDt,
Value<DateTime?> endDt = const Value.absent(),
Value<bool> allDay = const Value.absent(),
Value<String> description = const Value.absent(),
Value<String> location = const Value.absent(),
Value<String> color = const Value.absent(),
Value<String?> recurrence = const Value.absent(),
Value<int?> projectId = const Value.absent(),
Value<int?> reminderMinutes = const Value.absent(),
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedCalendarEventsCompanion.insert(
id: id,
title: title,
startDt: startDt,
endDt: endDt,
allDay: allDay,
description: description,
location: location,
color: color,
recurrence: recurrence,
projectId: projectId,
reminderMinutes: reminderMinutes,
cachedAt: cachedAt,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$CachedCalendarEventsTableProcessedTableManager =
ProcessedTableManager<
_$FabledDatabase,
$CachedCalendarEventsTable,
CachedCalendarEvent,
$$CachedCalendarEventsTableFilterComposer,
$$CachedCalendarEventsTableOrderingComposer,
$$CachedCalendarEventsTableAnnotationComposer,
$$CachedCalendarEventsTableCreateCompanionBuilder,
$$CachedCalendarEventsTableUpdateCompanionBuilder,
(
CachedCalendarEvent,
BaseReferences<
_$FabledDatabase,
$CachedCalendarEventsTable,
CachedCalendarEvent
>,
),
CachedCalendarEvent,
PrefetchHooks Function()
>;
typedef $$CachedConversationsTableCreateCompanionBuilder =
CachedConversationsCompanion Function({
Value<int> id,
required String title,
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt,
});
typedef $$CachedConversationsTableUpdateCompanionBuilder =
CachedConversationsCompanion Function({
Value<int> id,
Value<String> title,
Value<DateTime> createdAt,
Value<DateTime> updatedAt,
Value<DateTime> cachedAt,
});
class $$CachedConversationsTableFilterComposer
extends Composer<_$FabledDatabase, $CachedConversationsTable> {
$$CachedConversationsTableFilterComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnFilters(column),
);
}
class $$CachedConversationsTableOrderingComposer
extends Composer<_$FabledDatabase, $CachedConversationsTable> {
$$CachedConversationsTableOrderingComposer({
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 title => $composableBuilder(
column: $table.title,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get updatedAt => $composableBuilder(
column: $table.updatedAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get cachedAt => $composableBuilder(
column: $table.cachedAt,
builder: (column) => ColumnOrderings(column),
);
}
class $$CachedConversationsTableAnnotationComposer
extends Composer<_$FabledDatabase, $CachedConversationsTable> {
$$CachedConversationsTableAnnotationComposer({
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 title =>
$composableBuilder(column: $table.title, builder: (column) => column);
GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAt =>
$composableBuilder(column: $table.updatedAt, builder: (column) => column);
GeneratedColumn<DateTime> get cachedAt =>
$composableBuilder(column: $table.cachedAt, builder: (column) => column);
}
class $$CachedConversationsTableTableManager
extends
RootTableManager<
_$FabledDatabase,
$CachedConversationsTable,
CachedConversation,
$$CachedConversationsTableFilterComposer,
$$CachedConversationsTableOrderingComposer,
$$CachedConversationsTableAnnotationComposer,
$$CachedConversationsTableCreateCompanionBuilder,
$$CachedConversationsTableUpdateCompanionBuilder,
(
CachedConversation,
BaseReferences<
_$FabledDatabase,
$CachedConversationsTable,
CachedConversation
>,
),
CachedConversation,
PrefetchHooks Function()
> {
$$CachedConversationsTableTableManager(
_$FabledDatabase db,
$CachedConversationsTable table,
) : super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$CachedConversationsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$CachedConversationsTableOrderingComposer(
$db: db,
$table: table,
),
createComputedFieldComposer: () =>
$$CachedConversationsTableAnnotationComposer(
$db: db,
$table: table,
),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> title = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<DateTime> updatedAt = const Value.absent(),
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedConversationsCompanion(
id: id,
title: title,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String title,
required DateTime createdAt,
required DateTime updatedAt,
Value<DateTime> cachedAt = const Value.absent(),
}) => CachedConversationsCompanion.insert(
id: id,
title: title,
createdAt: createdAt,
updatedAt: updatedAt,
cachedAt: cachedAt,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$CachedConversationsTableProcessedTableManager =
ProcessedTableManager<
_$FabledDatabase,
$CachedConversationsTable,
CachedConversation,
$$CachedConversationsTableFilterComposer,
$$CachedConversationsTableOrderingComposer,
$$CachedConversationsTableAnnotationComposer,
$$CachedConversationsTableCreateCompanionBuilder,
$$CachedConversationsTableUpdateCompanionBuilder,
(
CachedConversation,
BaseReferences<
_$FabledDatabase,
$CachedConversationsTable,
CachedConversation
>,
),
CachedConversation,
PrefetchHooks Function()
>;
typedef $$SyncMetadataTableCreateCompanionBuilder =
SyncMetadataCompanion Function({
required String domain,
required DateTime lastSyncedAt,
Value<int> rowid,
});
typedef $$SyncMetadataTableUpdateCompanionBuilder =
SyncMetadataCompanion Function({
Value<String> domain,
Value<DateTime> lastSyncedAt,
Value<int> rowid,
});
class $$SyncMetadataTableFilterComposer
extends Composer<_$FabledDatabase, $SyncMetadataTable> {
$$SyncMetadataTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get domain => $composableBuilder(
column: $table.domain,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get lastSyncedAt => $composableBuilder(
column: $table.lastSyncedAt,
builder: (column) => ColumnFilters(column),
);
}
class $$SyncMetadataTableOrderingComposer
extends Composer<_$FabledDatabase, $SyncMetadataTable> {
$$SyncMetadataTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get domain => $composableBuilder(
column: $table.domain,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get lastSyncedAt => $composableBuilder(
column: $table.lastSyncedAt,
builder: (column) => ColumnOrderings(column),
);
}
class $$SyncMetadataTableAnnotationComposer
extends Composer<_$FabledDatabase, $SyncMetadataTable> {
$$SyncMetadataTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get domain =>
$composableBuilder(column: $table.domain, builder: (column) => column);
GeneratedColumn<DateTime> get lastSyncedAt => $composableBuilder(
column: $table.lastSyncedAt,
builder: (column) => column,
);
}
class $$SyncMetadataTableTableManager
extends
RootTableManager<
_$FabledDatabase,
$SyncMetadataTable,
SyncMetadataData,
$$SyncMetadataTableFilterComposer,
$$SyncMetadataTableOrderingComposer,
$$SyncMetadataTableAnnotationComposer,
$$SyncMetadataTableCreateCompanionBuilder,
$$SyncMetadataTableUpdateCompanionBuilder,
(
SyncMetadataData,
BaseReferences<
_$FabledDatabase,
$SyncMetadataTable,
SyncMetadataData
>,
),
SyncMetadataData,
PrefetchHooks Function()
> {
$$SyncMetadataTableTableManager(_$FabledDatabase db, $SyncMetadataTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$SyncMetadataTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$SyncMetadataTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$SyncMetadataTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<String> domain = const Value.absent(),
Value<DateTime> lastSyncedAt = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) => SyncMetadataCompanion(
domain: domain,
lastSyncedAt: lastSyncedAt,
rowid: rowid,
),
createCompanionCallback:
({
required String domain,
required DateTime lastSyncedAt,
Value<int> rowid = const Value.absent(),
}) => SyncMetadataCompanion.insert(
domain: domain,
lastSyncedAt: lastSyncedAt,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$SyncMetadataTableProcessedTableManager =
ProcessedTableManager<
_$FabledDatabase,
$SyncMetadataTable,
SyncMetadataData,
$$SyncMetadataTableFilterComposer,
$$SyncMetadataTableOrderingComposer,
$$SyncMetadataTableAnnotationComposer,
$$SyncMetadataTableCreateCompanionBuilder,
$$SyncMetadataTableUpdateCompanionBuilder,
(
SyncMetadataData,
BaseReferences<_$FabledDatabase, $SyncMetadataTable, SyncMetadataData>,
),
SyncMetadataData,
PrefetchHooks Function()
>;
typedef $$PendingWritesTableCreateCompanionBuilder =
PendingWritesCompanion Function({
Value<int> id,
required String domain,
required String verb,
Value<int?> targetId,
Value<int?> tempId,
Value<String> payloadJson,
Value<DateTime?> baselineUpdatedAt,
Value<DateTime> createdAt,
Value<int> tries,
Value<String?> lastError,
});
typedef $$PendingWritesTableUpdateCompanionBuilder =
PendingWritesCompanion Function({
Value<int> id,
Value<String> domain,
Value<String> verb,
Value<int?> targetId,
Value<int?> tempId,
Value<String> payloadJson,
Value<DateTime?> baselineUpdatedAt,
Value<DateTime> createdAt,
Value<int> tries,
Value<String?> lastError,
});
class $$PendingWritesTableFilterComposer
extends Composer<_$FabledDatabase, $PendingWritesTable> {
$$PendingWritesTableFilterComposer({
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 domain => $composableBuilder(
column: $table.domain,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get verb => $composableBuilder(
column: $table.verb,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get targetId => $composableBuilder(
column: $table.targetId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get tempId => $composableBuilder(
column: $table.tempId,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get payloadJson => $composableBuilder(
column: $table.payloadJson,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get baselineUpdatedAt => $composableBuilder(
column: $table.baselineUpdatedAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get tries => $composableBuilder(
column: $table.tries,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get lastError => $composableBuilder(
column: $table.lastError,
builder: (column) => ColumnFilters(column),
);
}
class $$PendingWritesTableOrderingComposer
extends Composer<_$FabledDatabase, $PendingWritesTable> {
$$PendingWritesTableOrderingComposer({
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 domain => $composableBuilder(
column: $table.domain,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get verb => $composableBuilder(
column: $table.verb,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get targetId => $composableBuilder(
column: $table.targetId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get tempId => $composableBuilder(
column: $table.tempId,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get payloadJson => $composableBuilder(
column: $table.payloadJson,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get baselineUpdatedAt => $composableBuilder(
column: $table.baselineUpdatedAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get tries => $composableBuilder(
column: $table.tries,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get lastError => $composableBuilder(
column: $table.lastError,
builder: (column) => ColumnOrderings(column),
);
}
class $$PendingWritesTableAnnotationComposer
extends Composer<_$FabledDatabase, $PendingWritesTable> {
$$PendingWritesTableAnnotationComposer({
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 domain =>
$composableBuilder(column: $table.domain, builder: (column) => column);
GeneratedColumn<String> get verb =>
$composableBuilder(column: $table.verb, builder: (column) => column);
GeneratedColumn<int> get targetId =>
$composableBuilder(column: $table.targetId, builder: (column) => column);
GeneratedColumn<int> get tempId =>
$composableBuilder(column: $table.tempId, builder: (column) => column);
GeneratedColumn<String> get payloadJson => $composableBuilder(
column: $table.payloadJson,
builder: (column) => column,
);
GeneratedColumn<DateTime> get baselineUpdatedAt => $composableBuilder(
column: $table.baselineUpdatedAt,
builder: (column) => column,
);
GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column);
GeneratedColumn<int> get tries =>
$composableBuilder(column: $table.tries, builder: (column) => column);
GeneratedColumn<String> get lastError =>
$composableBuilder(column: $table.lastError, builder: (column) => column);
}
class $$PendingWritesTableTableManager
extends
RootTableManager<
_$FabledDatabase,
$PendingWritesTable,
PendingWrite,
$$PendingWritesTableFilterComposer,
$$PendingWritesTableOrderingComposer,
$$PendingWritesTableAnnotationComposer,
$$PendingWritesTableCreateCompanionBuilder,
$$PendingWritesTableUpdateCompanionBuilder,
(
PendingWrite,
BaseReferences<_$FabledDatabase, $PendingWritesTable, PendingWrite>,
),
PendingWrite,
PrefetchHooks Function()
> {
$$PendingWritesTableTableManager(
_$FabledDatabase db,
$PendingWritesTable table,
) : super(
TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$PendingWritesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$PendingWritesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$PendingWritesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> domain = const Value.absent(),
Value<String> verb = const Value.absent(),
Value<int?> targetId = const Value.absent(),
Value<int?> tempId = const Value.absent(),
Value<String> payloadJson = const Value.absent(),
Value<DateTime?> baselineUpdatedAt = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<int> tries = const Value.absent(),
Value<String?> lastError = const Value.absent(),
}) => PendingWritesCompanion(
id: id,
domain: domain,
verb: verb,
targetId: targetId,
tempId: tempId,
payloadJson: payloadJson,
baselineUpdatedAt: baselineUpdatedAt,
createdAt: createdAt,
tries: tries,
lastError: lastError,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String domain,
required String verb,
Value<int?> targetId = const Value.absent(),
Value<int?> tempId = const Value.absent(),
Value<String> payloadJson = const Value.absent(),
Value<DateTime?> baselineUpdatedAt = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<int> tries = const Value.absent(),
Value<String?> lastError = const Value.absent(),
}) => PendingWritesCompanion.insert(
id: id,
domain: domain,
verb: verb,
targetId: targetId,
tempId: tempId,
payloadJson: payloadJson,
baselineUpdatedAt: baselineUpdatedAt,
createdAt: createdAt,
tries: tries,
lastError: lastError,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$PendingWritesTableProcessedTableManager =
ProcessedTableManager<
_$FabledDatabase,
$PendingWritesTable,
PendingWrite,
$$PendingWritesTableFilterComposer,
$$PendingWritesTableOrderingComposer,
$$PendingWritesTableAnnotationComposer,
$$PendingWritesTableCreateCompanionBuilder,
$$PendingWritesTableUpdateCompanionBuilder,
(
PendingWrite,
BaseReferences<_$FabledDatabase, $PendingWritesTable, PendingWrite>,
),
PendingWrite,
PrefetchHooks Function()
>;
class $FabledDatabaseManager {
final _$FabledDatabase _db;
$FabledDatabaseManager(this._db);
$$CachedNotesTableTableManager get cachedNotes =>
$$CachedNotesTableTableManager(_db, _db.cachedNotes);
$$CachedTasksTableTableManager get cachedTasks =>
$$CachedTasksTableTableManager(_db, _db.cachedTasks);
$$CachedProjectsTableTableManager get cachedProjects =>
$$CachedProjectsTableTableManager(_db, _db.cachedProjects);
$$CachedMilestonesTableTableManager get cachedMilestones =>
$$CachedMilestonesTableTableManager(_db, _db.cachedMilestones);
$$CachedCalendarEventsTableTableManager get cachedCalendarEvents =>
$$CachedCalendarEventsTableTableManager(_db, _db.cachedCalendarEvents);
$$CachedConversationsTableTableManager get cachedConversations =>
$$CachedConversationsTableTableManager(_db, _db.cachedConversations);
$$SyncMetadataTableTableManager get syncMetadata =>
$$SyncMetadataTableTableManager(_db, _db.syncMetadata);
$$PendingWritesTableTableManager get pendingWrites =>
$$PendingWritesTableTableManager(_db, _db.pendingWrites);
}