Files
FinanceApp2/lib/database/database.g.dart
T
2025-05-12 19:08:22 +03:00

1131 lines
33 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'database.dart';
// ignore_for_file: type=lint
class $CategoriesTable extends Categories
with TableInfo<$CategoriesTable, CategoryDb> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$CategoriesTable(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 _nameMeta = const VerificationMeta('name');
@override
late final GeneratedColumn<String> name = GeneratedColumn<String>(
'name',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'),
);
static const VerificationMeta _iconMeta = const VerificationMeta('icon');
@override
late final GeneratedColumn<String> icon = GeneratedColumn<String>(
'icon',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _colorMeta = const VerificationMeta('color');
@override
late final GeneratedColumn<int> color = GeneratedColumn<int>(
'color',
aliasedName,
false,
type: DriftSqlType.int,
requiredDuringInsert: true,
);
@override
List<GeneratedColumn> get $columns => [id, name, icon, color];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'categories';
@override
VerificationContext validateIntegrity(
Insertable<CategoryDb> 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('name')) {
context.handle(
_nameMeta,
name.isAcceptableOrUnknown(data['name']!, _nameMeta),
);
} else if (isInserting) {
context.missing(_nameMeta);
}
if (data.containsKey('icon')) {
context.handle(
_iconMeta,
icon.isAcceptableOrUnknown(data['icon']!, _iconMeta),
);
} else if (isInserting) {
context.missing(_iconMeta);
}
if (data.containsKey('color')) {
context.handle(
_colorMeta,
color.isAcceptableOrUnknown(data['color']!, _colorMeta),
);
} else if (isInserting) {
context.missing(_colorMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
CategoryDb map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return CategoryDb(
id:
attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
name:
attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}name'],
)!,
icon:
attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}icon'],
)!,
color:
attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}color'],
)!,
);
}
@override
$CategoriesTable createAlias(String alias) {
return $CategoriesTable(attachedDatabase, alias);
}
}
class CategoryDb extends DataClass implements Insertable<CategoryDb> {
final int id;
final String name;
final String icon;
final int color;
const CategoryDb({
required this.id,
required this.name,
required this.icon,
required this.color,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['name'] = Variable<String>(name);
map['icon'] = Variable<String>(icon);
map['color'] = Variable<int>(color);
return map;
}
CategoriesCompanion toCompanion(bool nullToAbsent) {
return CategoriesCompanion(
id: Value(id),
name: Value(name),
icon: Value(icon),
color: Value(color),
);
}
factory CategoryDb.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return CategoryDb(
id: serializer.fromJson<int>(json['id']),
name: serializer.fromJson<String>(json['name']),
icon: serializer.fromJson<String>(json['icon']),
color: serializer.fromJson<int>(json['color']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'name': serializer.toJson<String>(name),
'icon': serializer.toJson<String>(icon),
'color': serializer.toJson<int>(color),
};
}
CategoryDb copyWith({int? id, String? name, String? icon, int? color}) =>
CategoryDb(
id: id ?? this.id,
name: name ?? this.name,
icon: icon ?? this.icon,
color: color ?? this.color,
);
CategoryDb copyWithCompanion(CategoriesCompanion data) {
return CategoryDb(
id: data.id.present ? data.id.value : this.id,
name: data.name.present ? data.name.value : this.name,
icon: data.icon.present ? data.icon.value : this.icon,
color: data.color.present ? data.color.value : this.color,
);
}
@override
String toString() {
return (StringBuffer('CategoryDb(')
..write('id: $id, ')
..write('name: $name, ')
..write('icon: $icon, ')
..write('color: $color')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(id, name, icon, color);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is CategoryDb &&
other.id == this.id &&
other.name == this.name &&
other.icon == this.icon &&
other.color == this.color);
}
class CategoriesCompanion extends UpdateCompanion<CategoryDb> {
final Value<int> id;
final Value<String> name;
final Value<String> icon;
final Value<int> color;
const CategoriesCompanion({
this.id = const Value.absent(),
this.name = const Value.absent(),
this.icon = const Value.absent(),
this.color = const Value.absent(),
});
CategoriesCompanion.insert({
this.id = const Value.absent(),
required String name,
required String icon,
required int color,
}) : name = Value(name),
icon = Value(icon),
color = Value(color);
static Insertable<CategoryDb> custom({
Expression<int>? id,
Expression<String>? name,
Expression<String>? icon,
Expression<int>? color,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (name != null) 'name': name,
if (icon != null) 'icon': icon,
if (color != null) 'color': color,
});
}
CategoriesCompanion copyWith({
Value<int>? id,
Value<String>? name,
Value<String>? icon,
Value<int>? color,
}) {
return CategoriesCompanion(
id: id ?? this.id,
name: name ?? this.name,
icon: icon ?? this.icon,
color: color ?? this.color,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (name.present) {
map['name'] = Variable<String>(name.value);
}
if (icon.present) {
map['icon'] = Variable<String>(icon.value);
}
if (color.present) {
map['color'] = Variable<int>(color.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('CategoriesCompanion(')
..write('id: $id, ')
..write('name: $name, ')
..write('icon: $icon, ')
..write('color: $color')
..write(')'))
.toString();
}
}
class $TransactionsTable extends Transactions
with TableInfo<$TransactionsTable, Transaction> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$TransactionsTable(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 _categoryNameMeta = const VerificationMeta(
'categoryName',
);
@override
late final GeneratedColumn<String> categoryName = GeneratedColumn<String>(
'category_name',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _amountMeta = const VerificationMeta('amount');
@override
late final GeneratedColumn<double> amount = GeneratedColumn<double>(
'amount',
aliasedName,
false,
type: DriftSqlType.double,
requiredDuringInsert: true,
);
static const VerificationMeta _dateMeta = const VerificationMeta('date');
@override
late final GeneratedColumn<DateTime> date = GeneratedColumn<DateTime>(
'date',
aliasedName,
false,
type: DriftSqlType.dateTime,
requiredDuringInsert: true,
);
static const VerificationMeta _merchantMeta = const VerificationMeta(
'merchant',
);
@override
late final GeneratedColumn<String> merchant = GeneratedColumn<String>(
'merchant',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: true,
);
static const VerificationMeta _typeMeta = const VerificationMeta('type');
@override
late final GeneratedColumn<String> type = GeneratedColumn<String>(
'type',
aliasedName,
false,
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultValue: const Constant('expense'),
);
@override
List<GeneratedColumn> get $columns => [
id,
categoryName,
amount,
date,
merchant,
type,
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'transactions';
@override
VerificationContext validateIntegrity(
Insertable<Transaction> 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('category_name')) {
context.handle(
_categoryNameMeta,
categoryName.isAcceptableOrUnknown(
data['category_name']!,
_categoryNameMeta,
),
);
} else if (isInserting) {
context.missing(_categoryNameMeta);
}
if (data.containsKey('amount')) {
context.handle(
_amountMeta,
amount.isAcceptableOrUnknown(data['amount']!, _amountMeta),
);
} else if (isInserting) {
context.missing(_amountMeta);
}
if (data.containsKey('date')) {
context.handle(
_dateMeta,
date.isAcceptableOrUnknown(data['date']!, _dateMeta),
);
} else if (isInserting) {
context.missing(_dateMeta);
}
if (data.containsKey('merchant')) {
context.handle(
_merchantMeta,
merchant.isAcceptableOrUnknown(data['merchant']!, _merchantMeta),
);
} else if (isInserting) {
context.missing(_merchantMeta);
}
if (data.containsKey('type')) {
context.handle(
_typeMeta,
type.isAcceptableOrUnknown(data['type']!, _typeMeta),
);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
Transaction map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return Transaction(
id:
attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
categoryName:
attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}category_name'],
)!,
amount:
attachedDatabase.typeMapping.read(
DriftSqlType.double,
data['${effectivePrefix}amount'],
)!,
date:
attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}date'],
)!,
merchant:
attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}merchant'],
)!,
type:
attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}type'],
)!,
);
}
@override
$TransactionsTable createAlias(String alias) {
return $TransactionsTable(attachedDatabase, alias);
}
}
class Transaction extends DataClass implements Insertable<Transaction> {
final int id;
final String categoryName;
final double amount;
final DateTime date;
final String merchant;
final String type;
const Transaction({
required this.id,
required this.categoryName,
required this.amount,
required this.date,
required this.merchant,
required this.type,
});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<int>(id);
map['category_name'] = Variable<String>(categoryName);
map['amount'] = Variable<double>(amount);
map['date'] = Variable<DateTime>(date);
map['merchant'] = Variable<String>(merchant);
map['type'] = Variable<String>(type);
return map;
}
TransactionsCompanion toCompanion(bool nullToAbsent) {
return TransactionsCompanion(
id: Value(id),
categoryName: Value(categoryName),
amount: Value(amount),
date: Value(date),
merchant: Value(merchant),
type: Value(type),
);
}
factory Transaction.fromJson(
Map<String, dynamic> json, {
ValueSerializer? serializer,
}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return Transaction(
id: serializer.fromJson<int>(json['id']),
categoryName: serializer.fromJson<String>(json['categoryName']),
amount: serializer.fromJson<double>(json['amount']),
date: serializer.fromJson<DateTime>(json['date']),
merchant: serializer.fromJson<String>(json['merchant']),
type: serializer.fromJson<String>(json['type']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<int>(id),
'categoryName': serializer.toJson<String>(categoryName),
'amount': serializer.toJson<double>(amount),
'date': serializer.toJson<DateTime>(date),
'merchant': serializer.toJson<String>(merchant),
'type': serializer.toJson<String>(type),
};
}
Transaction copyWith({
int? id,
String? categoryName,
double? amount,
DateTime? date,
String? merchant,
String? type,
}) => Transaction(
id: id ?? this.id,
categoryName: categoryName ?? this.categoryName,
amount: amount ?? this.amount,
date: date ?? this.date,
merchant: merchant ?? this.merchant,
type: type ?? this.type,
);
Transaction copyWithCompanion(TransactionsCompanion data) {
return Transaction(
id: data.id.present ? data.id.value : this.id,
categoryName:
data.categoryName.present
? data.categoryName.value
: this.categoryName,
amount: data.amount.present ? data.amount.value : this.amount,
date: data.date.present ? data.date.value : this.date,
merchant: data.merchant.present ? data.merchant.value : this.merchant,
type: data.type.present ? data.type.value : this.type,
);
}
@override
String toString() {
return (StringBuffer('Transaction(')
..write('id: $id, ')
..write('categoryName: $categoryName, ')
..write('amount: $amount, ')
..write('date: $date, ')
..write('merchant: $merchant, ')
..write('type: $type')
..write(')'))
.toString();
}
@override
int get hashCode =>
Object.hash(id, categoryName, amount, date, merchant, type);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is Transaction &&
other.id == this.id &&
other.categoryName == this.categoryName &&
other.amount == this.amount &&
other.date == this.date &&
other.merchant == this.merchant &&
other.type == this.type);
}
class TransactionsCompanion extends UpdateCompanion<Transaction> {
final Value<int> id;
final Value<String> categoryName;
final Value<double> amount;
final Value<DateTime> date;
final Value<String> merchant;
final Value<String> type;
const TransactionsCompanion({
this.id = const Value.absent(),
this.categoryName = const Value.absent(),
this.amount = const Value.absent(),
this.date = const Value.absent(),
this.merchant = const Value.absent(),
this.type = const Value.absent(),
});
TransactionsCompanion.insert({
this.id = const Value.absent(),
required String categoryName,
required double amount,
required DateTime date,
required String merchant,
this.type = const Value.absent(),
}) : categoryName = Value(categoryName),
amount = Value(amount),
date = Value(date),
merchant = Value(merchant);
static Insertable<Transaction> custom({
Expression<int>? id,
Expression<String>? categoryName,
Expression<double>? amount,
Expression<DateTime>? date,
Expression<String>? merchant,
Expression<String>? type,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (categoryName != null) 'category_name': categoryName,
if (amount != null) 'amount': amount,
if (date != null) 'date': date,
if (merchant != null) 'merchant': merchant,
if (type != null) 'type': type,
});
}
TransactionsCompanion copyWith({
Value<int>? id,
Value<String>? categoryName,
Value<double>? amount,
Value<DateTime>? date,
Value<String>? merchant,
Value<String>? type,
}) {
return TransactionsCompanion(
id: id ?? this.id,
categoryName: categoryName ?? this.categoryName,
amount: amount ?? this.amount,
date: date ?? this.date,
merchant: merchant ?? this.merchant,
type: type ?? this.type,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<int>(id.value);
}
if (categoryName.present) {
map['category_name'] = Variable<String>(categoryName.value);
}
if (amount.present) {
map['amount'] = Variable<double>(amount.value);
}
if (date.present) {
map['date'] = Variable<DateTime>(date.value);
}
if (merchant.present) {
map['merchant'] = Variable<String>(merchant.value);
}
if (type.present) {
map['type'] = Variable<String>(type.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('TransactionsCompanion(')
..write('id: $id, ')
..write('categoryName: $categoryName, ')
..write('amount: $amount, ')
..write('date: $date, ')
..write('merchant: $merchant, ')
..write('type: $type')
..write(')'))
.toString();
}
}
abstract class _$AppDatabase extends GeneratedDatabase {
_$AppDatabase(QueryExecutor e) : super(e);
$AppDatabaseManager get managers => $AppDatabaseManager(this);
late final $CategoriesTable categories = $CategoriesTable(this);
late final $TransactionsTable transactions = $TransactionsTable(this);
@override
Iterable<TableInfo<Table, Object?>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override
List<DatabaseSchemaEntity> get allSchemaEntities => [
categories,
transactions,
];
}
typedef $$CategoriesTableCreateCompanionBuilder =
CategoriesCompanion Function({
Value<int> id,
required String name,
required String icon,
required int color,
});
typedef $$CategoriesTableUpdateCompanionBuilder =
CategoriesCompanion Function({
Value<int> id,
Value<String> name,
Value<String> icon,
Value<int> color,
});
class $$CategoriesTableFilterComposer
extends Composer<_$AppDatabase, $CategoriesTable> {
$$CategoriesTableFilterComposer({
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 name => $composableBuilder(
column: $table.name,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get icon => $composableBuilder(
column: $table.icon,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<int> get color => $composableBuilder(
column: $table.color,
builder: (column) => ColumnFilters(column),
);
}
class $$CategoriesTableOrderingComposer
extends Composer<_$AppDatabase, $CategoriesTable> {
$$CategoriesTableOrderingComposer({
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 name => $composableBuilder(
column: $table.name,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get icon => $composableBuilder(
column: $table.icon,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<int> get color => $composableBuilder(
column: $table.color,
builder: (column) => ColumnOrderings(column),
);
}
class $$CategoriesTableAnnotationComposer
extends Composer<_$AppDatabase, $CategoriesTable> {
$$CategoriesTableAnnotationComposer({
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 name =>
$composableBuilder(column: $table.name, builder: (column) => column);
GeneratedColumn<String> get icon =>
$composableBuilder(column: $table.icon, builder: (column) => column);
GeneratedColumn<int> get color =>
$composableBuilder(column: $table.color, builder: (column) => column);
}
class $$CategoriesTableTableManager
extends
RootTableManager<
_$AppDatabase,
$CategoriesTable,
CategoryDb,
$$CategoriesTableFilterComposer,
$$CategoriesTableOrderingComposer,
$$CategoriesTableAnnotationComposer,
$$CategoriesTableCreateCompanionBuilder,
$$CategoriesTableUpdateCompanionBuilder,
(
CategoryDb,
BaseReferences<_$AppDatabase, $CategoriesTable, CategoryDb>,
),
CategoryDb,
PrefetchHooks Function()
> {
$$CategoriesTableTableManager(_$AppDatabase db, $CategoriesTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer:
() => $$CategoriesTableFilterComposer($db: db, $table: table),
createOrderingComposer:
() => $$CategoriesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer:
() => $$CategoriesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> name = const Value.absent(),
Value<String> icon = const Value.absent(),
Value<int> color = const Value.absent(),
}) => CategoriesCompanion(
id: id,
name: name,
icon: icon,
color: color,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String name,
required String icon,
required int color,
}) => CategoriesCompanion.insert(
id: id,
name: name,
icon: icon,
color: color,
),
withReferenceMapper:
(p0) =>
p0
.map(
(e) => (
e.readTable(table),
BaseReferences(db, table, e),
),
)
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$CategoriesTableProcessedTableManager =
ProcessedTableManager<
_$AppDatabase,
$CategoriesTable,
CategoryDb,
$$CategoriesTableFilterComposer,
$$CategoriesTableOrderingComposer,
$$CategoriesTableAnnotationComposer,
$$CategoriesTableCreateCompanionBuilder,
$$CategoriesTableUpdateCompanionBuilder,
(CategoryDb, BaseReferences<_$AppDatabase, $CategoriesTable, CategoryDb>),
CategoryDb,
PrefetchHooks Function()
>;
typedef $$TransactionsTableCreateCompanionBuilder =
TransactionsCompanion Function({
Value<int> id,
required String categoryName,
required double amount,
required DateTime date,
required String merchant,
Value<String> type,
});
typedef $$TransactionsTableUpdateCompanionBuilder =
TransactionsCompanion Function({
Value<int> id,
Value<String> categoryName,
Value<double> amount,
Value<DateTime> date,
Value<String> merchant,
Value<String> type,
});
class $$TransactionsTableFilterComposer
extends Composer<_$AppDatabase, $TransactionsTable> {
$$TransactionsTableFilterComposer({
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 categoryName => $composableBuilder(
column: $table.categoryName,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<double> get amount => $composableBuilder(
column: $table.amount,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<DateTime> get date => $composableBuilder(
column: $table.date,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get merchant => $composableBuilder(
column: $table.merchant,
builder: (column) => ColumnFilters(column),
);
ColumnFilters<String> get type => $composableBuilder(
column: $table.type,
builder: (column) => ColumnFilters(column),
);
}
class $$TransactionsTableOrderingComposer
extends Composer<_$AppDatabase, $TransactionsTable> {
$$TransactionsTableOrderingComposer({
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 categoryName => $composableBuilder(
column: $table.categoryName,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<double> get amount => $composableBuilder(
column: $table.amount,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<DateTime> get date => $composableBuilder(
column: $table.date,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get merchant => $composableBuilder(
column: $table.merchant,
builder: (column) => ColumnOrderings(column),
);
ColumnOrderings<String> get type => $composableBuilder(
column: $table.type,
builder: (column) => ColumnOrderings(column),
);
}
class $$TransactionsTableAnnotationComposer
extends Composer<_$AppDatabase, $TransactionsTable> {
$$TransactionsTableAnnotationComposer({
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 categoryName => $composableBuilder(
column: $table.categoryName,
builder: (column) => column,
);
GeneratedColumn<double> get amount =>
$composableBuilder(column: $table.amount, builder: (column) => column);
GeneratedColumn<DateTime> get date =>
$composableBuilder(column: $table.date, builder: (column) => column);
GeneratedColumn<String> get merchant =>
$composableBuilder(column: $table.merchant, builder: (column) => column);
GeneratedColumn<String> get type =>
$composableBuilder(column: $table.type, builder: (column) => column);
}
class $$TransactionsTableTableManager
extends
RootTableManager<
_$AppDatabase,
$TransactionsTable,
Transaction,
$$TransactionsTableFilterComposer,
$$TransactionsTableOrderingComposer,
$$TransactionsTableAnnotationComposer,
$$TransactionsTableCreateCompanionBuilder,
$$TransactionsTableUpdateCompanionBuilder,
(
Transaction,
BaseReferences<_$AppDatabase, $TransactionsTable, Transaction>,
),
Transaction,
PrefetchHooks Function()
> {
$$TransactionsTableTableManager(_$AppDatabase db, $TransactionsTable table)
: super(
TableManagerState(
db: db,
table: table,
createFilteringComposer:
() => $$TransactionsTableFilterComposer($db: db, $table: table),
createOrderingComposer:
() => $$TransactionsTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer:
() =>
$$TransactionsTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback:
({
Value<int> id = const Value.absent(),
Value<String> categoryName = const Value.absent(),
Value<double> amount = const Value.absent(),
Value<DateTime> date = const Value.absent(),
Value<String> merchant = const Value.absent(),
Value<String> type = const Value.absent(),
}) => TransactionsCompanion(
id: id,
categoryName: categoryName,
amount: amount,
date: date,
merchant: merchant,
type: type,
),
createCompanionCallback:
({
Value<int> id = const Value.absent(),
required String categoryName,
required double amount,
required DateTime date,
required String merchant,
Value<String> type = const Value.absent(),
}) => TransactionsCompanion.insert(
id: id,
categoryName: categoryName,
amount: amount,
date: date,
merchant: merchant,
type: type,
),
withReferenceMapper:
(p0) =>
p0
.map(
(e) => (
e.readTable(table),
BaseReferences(db, table, e),
),
)
.toList(),
prefetchHooksCallback: null,
),
);
}
typedef $$TransactionsTableProcessedTableManager =
ProcessedTableManager<
_$AppDatabase,
$TransactionsTable,
Transaction,
$$TransactionsTableFilterComposer,
$$TransactionsTableOrderingComposer,
$$TransactionsTableAnnotationComposer,
$$TransactionsTableCreateCompanionBuilder,
$$TransactionsTableUpdateCompanionBuilder,
(
Transaction,
BaseReferences<_$AppDatabase, $TransactionsTable, Transaction>,
),
Transaction,
PrefetchHooks Function()
>;
class $AppDatabaseManager {
final _$AppDatabase _db;
$AppDatabaseManager(this._db);
$$CategoriesTableTableManager get categories =>
$$CategoriesTableTableManager(_db, _db.categories);
$$TransactionsTableTableManager get transactions =>
$$TransactionsTableTableManager(_db, _db.transactions);
}