chore: Upgrade Serverpod to 4.0.0-beta.1 (#105)
This commit is contained in:
parent
8e7e6551e0
commit
40dbd7a73a
119 changed files with 1635 additions and 2852 deletions
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
benchmark_harness: ^2.4.0
|
||||
intl: ^0.20.2
|
||||
path: ^1.9.1
|
||||
serverpod_database: 4.0.0-beta.0
|
||||
serverpod_database: 4.0.0-beta.1
|
||||
serverpod_offline_sync:
|
||||
path: ../packages/serverpod_offline_sync
|
||||
serverpod_offline_sync_server:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import 'dart:typed_data';
|
|||
import 'package:benchmark_harness/benchmark_harness.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:serverpod_database/serverpod_database.dart';
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
import 'package:serverpod_offline_sync_server/serverpod_offline_sync_server.dart';
|
||||
import 'package:serverpod_offline_sync_test_client/serverpod_offline_sync_test_client.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -46,9 +46,6 @@ class QueryCountingDatabase implements Database {
|
|||
offset: offset,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
include: include,
|
||||
lockMode: lockMode,
|
||||
|
|
@ -92,9 +89,6 @@ class QueryCountingDatabase implements Database {
|
|||
offset: offset,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
include: include,
|
||||
lockMode: lockMode,
|
||||
|
|
@ -225,9 +219,6 @@ class QueryCountingDatabase implements Database {
|
|||
offset: offset,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -247,9 +238,6 @@ class QueryCountingDatabase implements Database {
|
|||
rows,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -278,9 +266,6 @@ class QueryCountingDatabase implements Database {
|
|||
where: where,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ dependencies:
|
|||
http: ^1.5.0
|
||||
path: ^1.9.1
|
||||
path_provider: ^2.1.5
|
||||
serverpod_database: 4.0.0-beta.0
|
||||
serverpod_database: 4.0.0-beta.1
|
||||
serverpod_offline_sync_client:
|
||||
path: ../../packages/serverpod_offline_sync_client
|
||||
serverpod_offline_sync_test_client:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: drift_offline_sync
|
||||
description: A Drift plugin to build offline-first applications with CRDT support.
|
||||
version: 4.0.0-beta.0
|
||||
version: 4.0.0-beta.1
|
||||
repository: https://github.com/marcelomendoncasoares/drift_offline_sync
|
||||
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import 'package:serverpod_serialization/serverpod_serialization.dart' as _i1;
|
|||
///
|
||||
/// This class is used to represent the base HLC timestamp, which will be
|
||||
/// extended with the node ID (in its canonical or normalized form).
|
||||
class BaseHlc implements _i1.SerializableModel {
|
||||
class BaseHlc implements _i1.SerializableModel, _i1.ProtocolSerialization {
|
||||
BaseHlc({
|
||||
required this.hlcDatetime,
|
||||
required this.hlcCounter,
|
||||
|
|
@ -59,6 +59,15 @@ class BaseHlc implements _i1.SerializableModel {
|
|||
};
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJsonForProtocol() {
|
||||
return {
|
||||
'__className__': 'serverpod_offline_sync.BaseHlc',
|
||||
'hlcDatetime': hlcDatetime.toJson(),
|
||||
'hlcCounter': hlcCounter,
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return _i1.SerializationManager.encode(this);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
// ignore_for_file: type_literal_in_constant_pattern
|
||||
// ignore_for_file: use_super_parameters
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
// ignore_for_file: dead_code, unnecessary_type_check
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:serverpod_serialization/serverpod_serialization.dart' as _i1;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ resolution: workspace
|
|||
|
||||
dependencies:
|
||||
clock: ^1.1.2
|
||||
serverpod_database: 4.0.0-beta.0
|
||||
serverpod_serialization: 4.0.0-beta.0
|
||||
serverpod_database: 4.0.0-beta.1
|
||||
serverpod_serialization: 4.0.0-beta.1
|
||||
uuid: ^4.5.3
|
||||
|
||||
dev_dependencies:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:meta/meta.dart';
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
import 'package:serverpod_serialization/serverpod_serialization.dart';
|
||||
|
||||
import '../protocol/protocol.dart';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
|
||||
import '../protocol/protocol.dart';
|
||||
|
||||
/// Last serialized index that still represents a visible CRDT row.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'dart:async';
|
|||
|
||||
import 'package:serverpod_client/serverpod_client.dart';
|
||||
import 'package:serverpod_database/serverpod_database.dart';
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
|
||||
import '../protocol/protocol.dart';
|
||||
import 'exceptions.dart';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:serverpod_database/serverpod_database.dart';
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../managers/scope.dart';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:serverpod_database/serverpod_database.dart';
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../database/database.dart';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:serverpod_database/serverpod_database.dart';
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../crdt/exceptions.dart';
|
||||
|
|
@ -241,9 +240,6 @@ class CrdtDatabase implements Database {
|
|||
offset: offset,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
include: include,
|
||||
lockMode: lockMode,
|
||||
|
|
@ -302,9 +298,6 @@ class CrdtDatabase implements Database {
|
|||
offset: offset,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
include: include,
|
||||
lockMode: lockMode,
|
||||
|
|
@ -712,9 +705,6 @@ class CrdtDatabase implements Database {
|
|||
offset: offset,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -737,9 +727,6 @@ class CrdtDatabase implements Database {
|
|||
offset: offset,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: tx,
|
||||
);
|
||||
|
||||
|
|
@ -769,9 +756,6 @@ class CrdtDatabase implements Database {
|
|||
),
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -812,9 +796,6 @@ class CrdtDatabase implements Database {
|
|||
where: where,
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -833,9 +814,6 @@ class CrdtDatabase implements Database {
|
|||
),
|
||||
orderBy: orderBy,
|
||||
orderByList: orderByList,
|
||||
// Remove this once the deprecated member is removed.
|
||||
// ignore: deprecated_member_use
|
||||
orderDescending: orderDescending,
|
||||
transaction: tx,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:serverpod_database/serverpod_database.dart';
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
import 'package:serverpod_serialization/serverpod_serialization.dart';
|
||||
|
||||
import '../crdt/exceptions.dart';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../protocol/protocol.dart';
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart' as _i1;
|
||||
import 'package:serverpod_database/serverpod_database.dart' as _i2;
|
||||
import '../data/row.dart' as _i3;
|
||||
import '../node/node.dart' as _i4;
|
||||
import '../data/deleted_reason.dart' as _i5;
|
||||
import 'package:serverpod_client/serverpod_client.dart' as _i6;
|
||||
import 'package:serverpod_client/serverpod_client.dart' as _i3;
|
||||
import '../data/row.dart' as _i4;
|
||||
import '../node/node.dart' as _i5;
|
||||
import '../data/deleted_reason.dart' as _i6;
|
||||
import 'package:serverpod_offline_sync_client/src/protocol/protocol.dart'
|
||||
as _i7;
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ import 'package:serverpod_offline_sync_client/src/protocol/protocol.dart'
|
|||
/// This table stores materialized monotone CLFlag metadata after a visibility
|
||||
/// change event has been recorded.
|
||||
abstract class CrdtDataDeleted extends _i1.BaseHlc
|
||||
implements _i2.TableRow<int?> {
|
||||
implements _i2.TableRow<int?>, _i3.ProtocolSerialization {
|
||||
CrdtDataDeleted._({
|
||||
this.id,
|
||||
required super.hlcDatetime,
|
||||
|
|
@ -42,33 +42,33 @@ abstract class CrdtDataDeleted extends _i1.BaseHlc
|
|||
int? id,
|
||||
required DateTime hlcDatetime,
|
||||
required int hlcCounter,
|
||||
_i3.CrdtDataRow? row,
|
||||
_i4.CrdtDataRow? row,
|
||||
required int rowId,
|
||||
required int nodeId,
|
||||
_i4.CrdtNode? node,
|
||||
_i5.CrdtNode? node,
|
||||
required int clFlag,
|
||||
required _i5.CrdtDataDeletedReason reason,
|
||||
required _i6.CrdtDataDeletedReason reason,
|
||||
}) = _CrdtDataDeletedImpl;
|
||||
|
||||
factory CrdtDataDeleted.fromJson(Map<String, dynamic> jsonSerialization) {
|
||||
return CrdtDataDeleted(
|
||||
id: jsonSerialization['id'] as int?,
|
||||
hlcDatetime: _i6.DateTimeJsonExtension.fromJson(
|
||||
hlcDatetime: _i3.DateTimeJsonExtension.fromJson(
|
||||
jsonSerialization['hlcDatetime'],
|
||||
),
|
||||
hlcCounter: jsonSerialization['hlcCounter'] as int,
|
||||
row: jsonSerialization['row'] == null
|
||||
? null
|
||||
: _i7.Protocol().deserialize<_i3.CrdtDataRow>(
|
||||
: _i7.Protocol().deserialize<_i4.CrdtDataRow>(
|
||||
jsonSerialization['row'],
|
||||
),
|
||||
rowId: jsonSerialization['rowId'] as int,
|
||||
nodeId: jsonSerialization['nodeId'] as int,
|
||||
node: jsonSerialization['node'] == null
|
||||
? null
|
||||
: _i7.Protocol().deserialize<_i4.CrdtNode>(jsonSerialization['node']),
|
||||
: _i7.Protocol().deserialize<_i5.CrdtNode>(jsonSerialization['node']),
|
||||
clFlag: jsonSerialization['clFlag'] as int,
|
||||
reason: _i5.CrdtDataDeletedReason.fromJson(
|
||||
reason: _i6.CrdtDataDeletedReason.fromJson(
|
||||
(jsonSerialization['reason'] as int),
|
||||
),
|
||||
);
|
||||
|
|
@ -82,20 +82,20 @@ abstract class CrdtDataDeleted extends _i1.BaseHlc
|
|||
int? id;
|
||||
|
||||
/// Row whose visibility is tracked.
|
||||
_i3.CrdtDataRow? row;
|
||||
_i4.CrdtDataRow? row;
|
||||
|
||||
int rowId;
|
||||
|
||||
int nodeId;
|
||||
|
||||
/// The node that updated the field.
|
||||
_i4.CrdtNode? node;
|
||||
_i5.CrdtNode? node;
|
||||
|
||||
/// Monotone causal-length flag. Odd values are visible and even values are deleted.
|
||||
int clFlag;
|
||||
|
||||
/// Why the row entered its current visibility generation.
|
||||
_i5.CrdtDataDeletedReason reason;
|
||||
_i6.CrdtDataDeletedReason reason;
|
||||
|
||||
@override
|
||||
_i2.Table<int?> get table => t;
|
||||
|
|
@ -103,17 +103,17 @@ abstract class CrdtDataDeleted extends _i1.BaseHlc
|
|||
/// Returns a shallow copy of this [CrdtDataDeleted]
|
||||
/// with some or all fields replaced by the given arguments.
|
||||
@override
|
||||
@_i6.useResult
|
||||
@_i3.useResult
|
||||
CrdtDataDeleted copyWith({
|
||||
int? id,
|
||||
DateTime? hlcDatetime,
|
||||
int? hlcCounter,
|
||||
_i3.CrdtDataRow? row,
|
||||
_i4.CrdtDataRow? row,
|
||||
int? rowId,
|
||||
int? nodeId,
|
||||
_i4.CrdtNode? node,
|
||||
_i5.CrdtNode? node,
|
||||
int? clFlag,
|
||||
_i5.CrdtDataDeletedReason? reason,
|
||||
_i6.CrdtDataDeletedReason? reason,
|
||||
});
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
|
|
@ -131,9 +131,25 @@ abstract class CrdtDataDeleted extends _i1.BaseHlc
|
|||
};
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJsonForProtocol() {
|
||||
return {
|
||||
'__className__': 'serverpod_offline_sync.CrdtDataDeleted',
|
||||
if (id != null) 'id': id,
|
||||
'hlcDatetime': hlcDatetime.toJson(),
|
||||
'hlcCounter': hlcCounter,
|
||||
if (row != null) 'row': row?.toJsonForProtocol(),
|
||||
'rowId': rowId,
|
||||
'nodeId': nodeId,
|
||||
if (node != null) 'node': node?.toJsonForProtocol(),
|
||||
'clFlag': clFlag,
|
||||
'reason': reason.toJson(),
|
||||
};
|
||||
}
|
||||
|
||||
static CrdtDataDeletedInclude include({
|
||||
_i3.CrdtDataRowInclude? row,
|
||||
_i4.CrdtNodeInclude? node,
|
||||
_i4.CrdtDataRowInclude? row,
|
||||
_i5.CrdtNodeInclude? node,
|
||||
}) {
|
||||
return CrdtDataDeletedInclude._(
|
||||
row: row,
|
||||
|
|
@ -146,8 +162,6 @@ abstract class CrdtDataDeleted extends _i1.BaseHlc
|
|||
int? limit,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataDeletedTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataDeletedTable>? orderByList,
|
||||
CrdtDataDeletedInclude? include,
|
||||
}) {
|
||||
|
|
@ -156,8 +170,6 @@ abstract class CrdtDataDeleted extends _i1.BaseHlc
|
|||
limit: limit,
|
||||
offset: offset,
|
||||
orderBy: orderBy?.call(CrdtDataDeleted.t),
|
||||
orderDescending: // ignore: deprecated_member_use_from_same_package
|
||||
orderDescending,
|
||||
orderByList: orderByList?.call(CrdtDataDeleted.t),
|
||||
include: include,
|
||||
);
|
||||
|
|
@ -165,7 +177,7 @@ abstract class CrdtDataDeleted extends _i1.BaseHlc
|
|||
|
||||
@override
|
||||
String toString() {
|
||||
return _i6.SerializationManager.encode(this);
|
||||
return _i3.SerializationManager.encode(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,12 +188,12 @@ class _CrdtDataDeletedImpl extends CrdtDataDeleted {
|
|||
int? id,
|
||||
required DateTime hlcDatetime,
|
||||
required int hlcCounter,
|
||||
_i3.CrdtDataRow? row,
|
||||
_i4.CrdtDataRow? row,
|
||||
required int rowId,
|
||||
required int nodeId,
|
||||
_i4.CrdtNode? node,
|
||||
_i5.CrdtNode? node,
|
||||
required int clFlag,
|
||||
required _i5.CrdtDataDeletedReason reason,
|
||||
required _i6.CrdtDataDeletedReason reason,
|
||||
}) : super._(
|
||||
id: id,
|
||||
hlcDatetime: hlcDatetime,
|
||||
|
|
@ -196,7 +208,7 @@ class _CrdtDataDeletedImpl extends CrdtDataDeleted {
|
|||
|
||||
/// Returns a shallow copy of this [CrdtDataDeleted]
|
||||
/// with some or all fields replaced by the given arguments.
|
||||
@_i6.useResult
|
||||
@_i3.useResult
|
||||
@override
|
||||
CrdtDataDeleted copyWith({
|
||||
Object? id = _Undefined,
|
||||
|
|
@ -207,16 +219,16 @@ class _CrdtDataDeletedImpl extends CrdtDataDeleted {
|
|||
int? nodeId,
|
||||
Object? node = _Undefined,
|
||||
int? clFlag,
|
||||
_i5.CrdtDataDeletedReason? reason,
|
||||
_i6.CrdtDataDeletedReason? reason,
|
||||
}) {
|
||||
return CrdtDataDeleted(
|
||||
id: id is int? ? id : this.id,
|
||||
hlcDatetime: hlcDatetime ?? this.hlcDatetime,
|
||||
hlcCounter: hlcCounter ?? this.hlcCounter,
|
||||
row: row is _i3.CrdtDataRow? ? row : this.row?.copyWith(),
|
||||
row: row is _i4.CrdtDataRow? ? row : this.row?.copyWith(),
|
||||
rowId: rowId ?? this.rowId,
|
||||
nodeId: nodeId ?? this.nodeId,
|
||||
node: node is _i4.CrdtNode? ? node : this.node?.copyWith(),
|
||||
node: node is _i5.CrdtNode? ? node : this.node?.copyWith(),
|
||||
clFlag: clFlag ?? this.clFlag,
|
||||
reason: reason ?? this.reason,
|
||||
);
|
||||
|
|
@ -252,8 +264,8 @@ class CrdtDataDeletedUpdateTable extends _i2.UpdateTable<CrdtDataDeletedTable> {
|
|||
value,
|
||||
);
|
||||
|
||||
_i2.ColumnValue<_i5.CrdtDataDeletedReason, _i5.CrdtDataDeletedReason> reason(
|
||||
_i5.CrdtDataDeletedReason value,
|
||||
_i2.ColumnValue<_i6.CrdtDataDeletedReason, _i6.CrdtDataDeletedReason> reason(
|
||||
_i6.CrdtDataDeletedReason value,
|
||||
) => _i2.ColumnValue(
|
||||
table.reason,
|
||||
value,
|
||||
|
|
@ -300,43 +312,43 @@ class CrdtDataDeletedTable extends _i2.Table<int?> {
|
|||
late final _i2.ColumnInt hlcCounter;
|
||||
|
||||
/// Row whose visibility is tracked.
|
||||
_i3.CrdtDataRowTable? _row;
|
||||
_i4.CrdtDataRowTable? _row;
|
||||
|
||||
late final _i2.ColumnInt rowId;
|
||||
|
||||
late final _i2.ColumnInt nodeId;
|
||||
|
||||
/// The node that updated the field.
|
||||
_i4.CrdtNodeTable? _node;
|
||||
_i5.CrdtNodeTable? _node;
|
||||
|
||||
/// Monotone causal-length flag. Odd values are visible and even values are deleted.
|
||||
late final _i2.ColumnInt clFlag;
|
||||
|
||||
/// Why the row entered its current visibility generation.
|
||||
late final _i2.ColumnEnum<_i5.CrdtDataDeletedReason> reason;
|
||||
late final _i2.ColumnEnum<_i6.CrdtDataDeletedReason> reason;
|
||||
|
||||
_i3.CrdtDataRowTable get row {
|
||||
_i4.CrdtDataRowTable get row {
|
||||
if (_row != null) return _row!;
|
||||
_row = _i2.createRelationTable(
|
||||
relationFieldName: 'row',
|
||||
field: CrdtDataDeleted.t.rowId,
|
||||
foreignField: _i3.CrdtDataRow.t.id,
|
||||
foreignField: _i4.CrdtDataRow.t.id,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i3.CrdtDataRowTable(tableRelation: foreignTableRelation),
|
||||
_i4.CrdtDataRowTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _row!;
|
||||
}
|
||||
|
||||
_i4.CrdtNodeTable get node {
|
||||
_i5.CrdtNodeTable get node {
|
||||
if (_node != null) return _node!;
|
||||
_node = _i2.createRelationTable(
|
||||
relationFieldName: 'node',
|
||||
field: CrdtDataDeleted.t.nodeId,
|
||||
foreignField: _i4.CrdtNode.t.id,
|
||||
foreignField: _i5.CrdtNode.t.id,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i4.CrdtNodeTable(tableRelation: foreignTableRelation),
|
||||
_i5.CrdtNodeTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _node!;
|
||||
}
|
||||
|
|
@ -366,16 +378,16 @@ class CrdtDataDeletedTable extends _i2.Table<int?> {
|
|||
|
||||
class CrdtDataDeletedInclude extends _i2.IncludeObject {
|
||||
CrdtDataDeletedInclude._({
|
||||
_i3.CrdtDataRowInclude? row,
|
||||
_i4.CrdtNodeInclude? node,
|
||||
_i4.CrdtDataRowInclude? row,
|
||||
_i5.CrdtNodeInclude? node,
|
||||
}) {
|
||||
_row = row;
|
||||
_node = node;
|
||||
}
|
||||
|
||||
_i3.CrdtDataRowInclude? _row;
|
||||
_i4.CrdtDataRowInclude? _row;
|
||||
|
||||
_i4.CrdtNodeInclude? _node;
|
||||
_i5.CrdtNodeInclude? _node;
|
||||
|
||||
@override
|
||||
Map<String, _i2.Include?> get includes => {
|
||||
|
|
@ -393,8 +405,6 @@ class CrdtDataDeletedIncludeList extends _i2.IncludeList {
|
|||
super.limit,
|
||||
super.offset,
|
||||
super.orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
super.orderDescending,
|
||||
super.orderByList,
|
||||
super.include,
|
||||
}) {
|
||||
|
|
@ -441,8 +451,6 @@ class CrdtDataDeletedRepository {
|
|||
int? limit,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataDeletedTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataDeletedTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
CrdtDataDeletedInclude? include,
|
||||
|
|
@ -453,8 +461,6 @@ class CrdtDataDeletedRepository {
|
|||
where: where?.call(CrdtDataDeleted.t),
|
||||
orderBy: orderBy?.call(CrdtDataDeleted.t),
|
||||
orderByList: orderByList?.call(CrdtDataDeleted.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
transaction: transaction,
|
||||
|
|
@ -486,8 +492,6 @@ class CrdtDataDeletedRepository {
|
|||
_i2.WhereExpressionBuilder<CrdtDataDeletedTable>? where,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataDeletedTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataDeletedTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
CrdtDataDeletedInclude? include,
|
||||
|
|
@ -498,8 +502,6 @@ class CrdtDataDeletedRepository {
|
|||
where: where?.call(CrdtDataDeleted.t),
|
||||
orderBy: orderBy?.call(CrdtDataDeleted.t),
|
||||
orderByList: orderByList?.call(CrdtDataDeleted.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
offset: offset,
|
||||
transaction: transaction,
|
||||
include: include,
|
||||
|
|
@ -709,8 +711,6 @@ class CrdtDataDeletedRepository {
|
|||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataDeletedTable>? orderBy,
|
||||
_i2.OrderByListBuilder<CrdtDataDeletedTable>? orderByList,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
}) async {
|
||||
|
|
@ -721,8 +721,6 @@ class CrdtDataDeletedRepository {
|
|||
offset: offset,
|
||||
orderBy: orderBy?.call(CrdtDataDeleted.t),
|
||||
orderByList: orderByList?.call(CrdtDataDeleted.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -743,8 +741,6 @@ class CrdtDataDeletedRepository {
|
|||
_i2.DatabaseSession session,
|
||||
List<CrdtDataDeleted> rows, {
|
||||
_i2.OrderByBuilder<CrdtDataDeletedTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataDeletedTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
|
|
@ -753,8 +749,6 @@ class CrdtDataDeletedRepository {
|
|||
rows,
|
||||
orderBy: orderBy?.call(CrdtDataDeleted.t),
|
||||
orderByList: orderByList?.call(CrdtDataDeleted.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -784,8 +778,6 @@ class CrdtDataDeletedRepository {
|
|||
_i2.DatabaseSession session, {
|
||||
required _i2.WhereExpressionBuilder<CrdtDataDeletedTable> where,
|
||||
_i2.OrderByBuilder<CrdtDataDeletedTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataDeletedTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
|
|
@ -794,8 +786,6 @@ class CrdtDataDeletedRepository {
|
|||
where: where(CrdtDataDeleted.t),
|
||||
orderBy: orderBy?.call(CrdtDataDeleted.t),
|
||||
orderByList: orderByList?.call(CrdtDataDeleted.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -841,7 +831,7 @@ class CrdtDataDeletedAttachRowRepository {
|
|||
Future<void> row(
|
||||
_i2.DatabaseSession session,
|
||||
CrdtDataDeleted crdtDataDeleted,
|
||||
_i3.CrdtDataRow row, {
|
||||
_i4.CrdtDataRow row, {
|
||||
_i2.Transaction? transaction,
|
||||
}) async {
|
||||
if (crdtDataDeleted.id == null) {
|
||||
|
|
@ -864,7 +854,7 @@ class CrdtDataDeletedAttachRowRepository {
|
|||
Future<void> node(
|
||||
_i2.DatabaseSession session,
|
||||
CrdtDataDeleted crdtDataDeleted,
|
||||
_i4.CrdtNode node, {
|
||||
_i5.CrdtNode node, {
|
||||
_i2.Transaction? transaction,
|
||||
}) async {
|
||||
if (crdtDataDeleted.id == null) {
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@
|
|||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart' as _i1;
|
||||
import 'package:serverpod_database/serverpod_database.dart' as _i2;
|
||||
import '../data/row.dart' as _i3;
|
||||
import '../schema/column.dart' as _i4;
|
||||
import '../node/node.dart' as _i5;
|
||||
import '../data/foreign_key.dart' as _i6;
|
||||
import 'package:serverpod_client/serverpod_client.dart' as _i7;
|
||||
import 'package:serverpod_client/serverpod_client.dart' as _i3;
|
||||
import '../data/row.dart' as _i4;
|
||||
import '../schema/column.dart' as _i5;
|
||||
import '../node/node.dart' as _i6;
|
||||
import '../data/foreign_key.dart' as _i7;
|
||||
import 'package:serverpod_offline_sync_client/src/protocol/protocol.dart'
|
||||
as _i8;
|
||||
|
||||
|
|
@ -25,7 +25,8 @@ import 'package:serverpod_offline_sync_client/src/protocol/protocol.dart'
|
|||
///
|
||||
/// This table stores only the HLC timestamp for a field. During merge, if the
|
||||
/// other HLC is greater, the actual data must be fetched from the table itself.
|
||||
abstract class CrdtDataField extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
||||
abstract class CrdtDataField extends _i1.BaseHlc
|
||||
implements _i2.TableRow<int?>, _i3.ProtocolSerialization {
|
||||
CrdtDataField._({
|
||||
this.id,
|
||||
required super.hlcDatetime,
|
||||
|
|
@ -44,40 +45,40 @@ abstract class CrdtDataField extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
required DateTime hlcDatetime,
|
||||
required int hlcCounter,
|
||||
required int rowId,
|
||||
_i3.CrdtDataRow? row,
|
||||
_i4.CrdtDataRow? row,
|
||||
required int columnId,
|
||||
_i4.CrdtSchemaColumn? column,
|
||||
_i5.CrdtSchemaColumn? column,
|
||||
required int nodeId,
|
||||
_i5.CrdtNode? node,
|
||||
_i6.CrdtDataForeignKey? foreignKey,
|
||||
_i6.CrdtNode? node,
|
||||
_i7.CrdtDataForeignKey? foreignKey,
|
||||
}) = _CrdtDataFieldImpl;
|
||||
|
||||
factory CrdtDataField.fromJson(Map<String, dynamic> jsonSerialization) {
|
||||
return CrdtDataField(
|
||||
id: jsonSerialization['id'] as int?,
|
||||
hlcDatetime: _i7.DateTimeJsonExtension.fromJson(
|
||||
hlcDatetime: _i3.DateTimeJsonExtension.fromJson(
|
||||
jsonSerialization['hlcDatetime'],
|
||||
),
|
||||
hlcCounter: jsonSerialization['hlcCounter'] as int,
|
||||
rowId: jsonSerialization['rowId'] as int,
|
||||
row: jsonSerialization['row'] == null
|
||||
? null
|
||||
: _i8.Protocol().deserialize<_i3.CrdtDataRow>(
|
||||
: _i8.Protocol().deserialize<_i4.CrdtDataRow>(
|
||||
jsonSerialization['row'],
|
||||
),
|
||||
columnId: jsonSerialization['columnId'] as int,
|
||||
column: jsonSerialization['column'] == null
|
||||
? null
|
||||
: _i8.Protocol().deserialize<_i4.CrdtSchemaColumn>(
|
||||
: _i8.Protocol().deserialize<_i5.CrdtSchemaColumn>(
|
||||
jsonSerialization['column'],
|
||||
),
|
||||
nodeId: jsonSerialization['nodeId'] as int,
|
||||
node: jsonSerialization['node'] == null
|
||||
? null
|
||||
: _i8.Protocol().deserialize<_i5.CrdtNode>(jsonSerialization['node']),
|
||||
: _i8.Protocol().deserialize<_i6.CrdtNode>(jsonSerialization['node']),
|
||||
foreignKey: jsonSerialization['foreignKey'] == null
|
||||
? null
|
||||
: _i8.Protocol().deserialize<_i6.CrdtDataForeignKey>(
|
||||
: _i8.Protocol().deserialize<_i7.CrdtDataForeignKey>(
|
||||
jsonSerialization['foreignKey'],
|
||||
),
|
||||
);
|
||||
|
|
@ -93,21 +94,21 @@ abstract class CrdtDataField extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
int rowId;
|
||||
|
||||
/// Row that the field belongs to.
|
||||
_i3.CrdtDataRow? row;
|
||||
_i4.CrdtDataRow? row;
|
||||
|
||||
int columnId;
|
||||
|
||||
/// Column that the field belongs to.
|
||||
_i4.CrdtSchemaColumn? column;
|
||||
_i5.CrdtSchemaColumn? column;
|
||||
|
||||
int nodeId;
|
||||
|
||||
/// The node that updated the field.
|
||||
_i5.CrdtNode? node;
|
||||
_i6.CrdtNode? node;
|
||||
|
||||
/// The foreign key information for the field, if this field holds a
|
||||
/// reference to another row.
|
||||
_i6.CrdtDataForeignKey? foreignKey;
|
||||
_i7.CrdtDataForeignKey? foreignKey;
|
||||
|
||||
@override
|
||||
_i2.Table<int?> get table => t;
|
||||
|
|
@ -115,18 +116,18 @@ abstract class CrdtDataField extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
/// Returns a shallow copy of this [CrdtDataField]
|
||||
/// with some or all fields replaced by the given arguments.
|
||||
@override
|
||||
@_i7.useResult
|
||||
@_i3.useResult
|
||||
CrdtDataField copyWith({
|
||||
int? id,
|
||||
DateTime? hlcDatetime,
|
||||
int? hlcCounter,
|
||||
int? rowId,
|
||||
_i3.CrdtDataRow? row,
|
||||
_i4.CrdtDataRow? row,
|
||||
int? columnId,
|
||||
_i4.CrdtSchemaColumn? column,
|
||||
_i5.CrdtSchemaColumn? column,
|
||||
int? nodeId,
|
||||
_i5.CrdtNode? node,
|
||||
_i6.CrdtDataForeignKey? foreignKey,
|
||||
_i6.CrdtNode? node,
|
||||
_i7.CrdtDataForeignKey? foreignKey,
|
||||
});
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
|
|
@ -145,11 +146,28 @@ abstract class CrdtDataField extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
};
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJsonForProtocol() {
|
||||
return {
|
||||
'__className__': 'serverpod_offline_sync.CrdtDataField',
|
||||
if (id != null) 'id': id,
|
||||
'hlcDatetime': hlcDatetime.toJson(),
|
||||
'hlcCounter': hlcCounter,
|
||||
'rowId': rowId,
|
||||
if (row != null) 'row': row?.toJsonForProtocol(),
|
||||
'columnId': columnId,
|
||||
if (column != null) 'column': column?.toJsonForProtocol(),
|
||||
'nodeId': nodeId,
|
||||
if (node != null) 'node': node?.toJsonForProtocol(),
|
||||
if (foreignKey != null) 'foreignKey': foreignKey?.toJsonForProtocol(),
|
||||
};
|
||||
}
|
||||
|
||||
static CrdtDataFieldInclude include({
|
||||
_i3.CrdtDataRowInclude? row,
|
||||
_i4.CrdtSchemaColumnInclude? column,
|
||||
_i5.CrdtNodeInclude? node,
|
||||
_i6.CrdtDataForeignKeyInclude? foreignKey,
|
||||
_i4.CrdtDataRowInclude? row,
|
||||
_i5.CrdtSchemaColumnInclude? column,
|
||||
_i6.CrdtNodeInclude? node,
|
||||
_i7.CrdtDataForeignKeyInclude? foreignKey,
|
||||
}) {
|
||||
return CrdtDataFieldInclude._(
|
||||
row: row,
|
||||
|
|
@ -164,8 +182,6 @@ abstract class CrdtDataField extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
int? limit,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataFieldTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataFieldTable>? orderByList,
|
||||
CrdtDataFieldInclude? include,
|
||||
}) {
|
||||
|
|
@ -174,8 +190,6 @@ abstract class CrdtDataField extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
limit: limit,
|
||||
offset: offset,
|
||||
orderBy: orderBy?.call(CrdtDataField.t),
|
||||
orderDescending: // ignore: deprecated_member_use_from_same_package
|
||||
orderDescending,
|
||||
orderByList: orderByList?.call(CrdtDataField.t),
|
||||
include: include,
|
||||
);
|
||||
|
|
@ -183,7 +197,7 @@ abstract class CrdtDataField extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
|
||||
@override
|
||||
String toString() {
|
||||
return _i7.SerializationManager.encode(this);
|
||||
return _i3.SerializationManager.encode(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -195,12 +209,12 @@ class _CrdtDataFieldImpl extends CrdtDataField {
|
|||
required DateTime hlcDatetime,
|
||||
required int hlcCounter,
|
||||
required int rowId,
|
||||
_i3.CrdtDataRow? row,
|
||||
_i4.CrdtDataRow? row,
|
||||
required int columnId,
|
||||
_i4.CrdtSchemaColumn? column,
|
||||
_i5.CrdtSchemaColumn? column,
|
||||
required int nodeId,
|
||||
_i5.CrdtNode? node,
|
||||
_i6.CrdtDataForeignKey? foreignKey,
|
||||
_i6.CrdtNode? node,
|
||||
_i7.CrdtDataForeignKey? foreignKey,
|
||||
}) : super._(
|
||||
id: id,
|
||||
hlcDatetime: hlcDatetime,
|
||||
|
|
@ -216,7 +230,7 @@ class _CrdtDataFieldImpl extends CrdtDataField {
|
|||
|
||||
/// Returns a shallow copy of this [CrdtDataField]
|
||||
/// with some or all fields replaced by the given arguments.
|
||||
@_i7.useResult
|
||||
@_i3.useResult
|
||||
@override
|
||||
CrdtDataField copyWith({
|
||||
Object? id = _Undefined,
|
||||
|
|
@ -235,14 +249,14 @@ class _CrdtDataFieldImpl extends CrdtDataField {
|
|||
hlcDatetime: hlcDatetime ?? this.hlcDatetime,
|
||||
hlcCounter: hlcCounter ?? this.hlcCounter,
|
||||
rowId: rowId ?? this.rowId,
|
||||
row: row is _i3.CrdtDataRow? ? row : this.row?.copyWith(),
|
||||
row: row is _i4.CrdtDataRow? ? row : this.row?.copyWith(),
|
||||
columnId: columnId ?? this.columnId,
|
||||
column: column is _i4.CrdtSchemaColumn?
|
||||
column: column is _i5.CrdtSchemaColumn?
|
||||
? column
|
||||
: this.column?.copyWith(),
|
||||
nodeId: nodeId ?? this.nodeId,
|
||||
node: node is _i5.CrdtNode? ? node : this.node?.copyWith(),
|
||||
foreignKey: foreignKey is _i6.CrdtDataForeignKey?
|
||||
node: node is _i6.CrdtNode? ? node : this.node?.copyWith(),
|
||||
foreignKey: foreignKey is _i7.CrdtDataForeignKey?
|
||||
? foreignKey
|
||||
: this.foreignKey?.copyWith(),
|
||||
);
|
||||
|
|
@ -316,70 +330,70 @@ class CrdtDataFieldTable extends _i2.Table<int?> {
|
|||
late final _i2.ColumnInt rowId;
|
||||
|
||||
/// Row that the field belongs to.
|
||||
_i3.CrdtDataRowTable? _row;
|
||||
_i4.CrdtDataRowTable? _row;
|
||||
|
||||
late final _i2.ColumnInt columnId;
|
||||
|
||||
/// Column that the field belongs to.
|
||||
_i4.CrdtSchemaColumnTable? _column;
|
||||
_i5.CrdtSchemaColumnTable? _column;
|
||||
|
||||
late final _i2.ColumnInt nodeId;
|
||||
|
||||
/// The node that updated the field.
|
||||
_i5.CrdtNodeTable? _node;
|
||||
_i6.CrdtNodeTable? _node;
|
||||
|
||||
/// The foreign key information for the field, if this field holds a
|
||||
/// reference to another row.
|
||||
_i6.CrdtDataForeignKeyTable? _foreignKey;
|
||||
_i7.CrdtDataForeignKeyTable? _foreignKey;
|
||||
|
||||
_i3.CrdtDataRowTable get row {
|
||||
_i4.CrdtDataRowTable get row {
|
||||
if (_row != null) return _row!;
|
||||
_row = _i2.createRelationTable(
|
||||
relationFieldName: 'row',
|
||||
field: CrdtDataField.t.rowId,
|
||||
foreignField: _i3.CrdtDataRow.t.id,
|
||||
foreignField: _i4.CrdtDataRow.t.id,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i3.CrdtDataRowTable(tableRelation: foreignTableRelation),
|
||||
_i4.CrdtDataRowTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _row!;
|
||||
}
|
||||
|
||||
_i4.CrdtSchemaColumnTable get column {
|
||||
_i5.CrdtSchemaColumnTable get column {
|
||||
if (_column != null) return _column!;
|
||||
_column = _i2.createRelationTable(
|
||||
relationFieldName: 'column',
|
||||
field: CrdtDataField.t.columnId,
|
||||
foreignField: _i4.CrdtSchemaColumn.t.id,
|
||||
foreignField: _i5.CrdtSchemaColumn.t.id,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i4.CrdtSchemaColumnTable(tableRelation: foreignTableRelation),
|
||||
_i5.CrdtSchemaColumnTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _column!;
|
||||
}
|
||||
|
||||
_i5.CrdtNodeTable get node {
|
||||
_i6.CrdtNodeTable get node {
|
||||
if (_node != null) return _node!;
|
||||
_node = _i2.createRelationTable(
|
||||
relationFieldName: 'node',
|
||||
field: CrdtDataField.t.nodeId,
|
||||
foreignField: _i5.CrdtNode.t.id,
|
||||
foreignField: _i6.CrdtNode.t.id,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i5.CrdtNodeTable(tableRelation: foreignTableRelation),
|
||||
_i6.CrdtNodeTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _node!;
|
||||
}
|
||||
|
||||
_i6.CrdtDataForeignKeyTable get foreignKey {
|
||||
_i7.CrdtDataForeignKeyTable get foreignKey {
|
||||
if (_foreignKey != null) return _foreignKey!;
|
||||
_foreignKey = _i2.createRelationTable(
|
||||
relationFieldName: 'foreignKey',
|
||||
field: CrdtDataField.t.id,
|
||||
foreignField: _i6.CrdtDataForeignKey.t.fieldId,
|
||||
foreignField: _i7.CrdtDataForeignKey.t.fieldId,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i6.CrdtDataForeignKeyTable(tableRelation: foreignTableRelation),
|
||||
_i7.CrdtDataForeignKeyTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _foreignKey!;
|
||||
}
|
||||
|
|
@ -414,10 +428,10 @@ class CrdtDataFieldTable extends _i2.Table<int?> {
|
|||
|
||||
class CrdtDataFieldInclude extends _i2.IncludeObject {
|
||||
CrdtDataFieldInclude._({
|
||||
_i3.CrdtDataRowInclude? row,
|
||||
_i4.CrdtSchemaColumnInclude? column,
|
||||
_i5.CrdtNodeInclude? node,
|
||||
_i6.CrdtDataForeignKeyInclude? foreignKey,
|
||||
_i4.CrdtDataRowInclude? row,
|
||||
_i5.CrdtSchemaColumnInclude? column,
|
||||
_i6.CrdtNodeInclude? node,
|
||||
_i7.CrdtDataForeignKeyInclude? foreignKey,
|
||||
}) {
|
||||
_row = row;
|
||||
_column = column;
|
||||
|
|
@ -425,13 +439,13 @@ class CrdtDataFieldInclude extends _i2.IncludeObject {
|
|||
_foreignKey = foreignKey;
|
||||
}
|
||||
|
||||
_i3.CrdtDataRowInclude? _row;
|
||||
_i4.CrdtDataRowInclude? _row;
|
||||
|
||||
_i4.CrdtSchemaColumnInclude? _column;
|
||||
_i5.CrdtSchemaColumnInclude? _column;
|
||||
|
||||
_i5.CrdtNodeInclude? _node;
|
||||
_i6.CrdtNodeInclude? _node;
|
||||
|
||||
_i6.CrdtDataForeignKeyInclude? _foreignKey;
|
||||
_i7.CrdtDataForeignKeyInclude? _foreignKey;
|
||||
|
||||
@override
|
||||
Map<String, _i2.Include?> get includes => {
|
||||
|
|
@ -451,8 +465,6 @@ class CrdtDataFieldIncludeList extends _i2.IncludeList {
|
|||
super.limit,
|
||||
super.offset,
|
||||
super.orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
super.orderDescending,
|
||||
super.orderByList,
|
||||
super.include,
|
||||
}) {
|
||||
|
|
@ -501,8 +513,6 @@ class CrdtDataFieldRepository {
|
|||
int? limit,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataFieldTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataFieldTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
CrdtDataFieldInclude? include,
|
||||
|
|
@ -513,8 +523,6 @@ class CrdtDataFieldRepository {
|
|||
where: where?.call(CrdtDataField.t),
|
||||
orderBy: orderBy?.call(CrdtDataField.t),
|
||||
orderByList: orderByList?.call(CrdtDataField.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
transaction: transaction,
|
||||
|
|
@ -546,8 +554,6 @@ class CrdtDataFieldRepository {
|
|||
_i2.WhereExpressionBuilder<CrdtDataFieldTable>? where,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataFieldTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataFieldTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
CrdtDataFieldInclude? include,
|
||||
|
|
@ -558,8 +564,6 @@ class CrdtDataFieldRepository {
|
|||
where: where?.call(CrdtDataField.t),
|
||||
orderBy: orderBy?.call(CrdtDataField.t),
|
||||
orderByList: orderByList?.call(CrdtDataField.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
offset: offset,
|
||||
transaction: transaction,
|
||||
include: include,
|
||||
|
|
@ -767,8 +771,6 @@ class CrdtDataFieldRepository {
|
|||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataFieldTable>? orderBy,
|
||||
_i2.OrderByListBuilder<CrdtDataFieldTable>? orderByList,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
}) async {
|
||||
|
|
@ -779,8 +781,6 @@ class CrdtDataFieldRepository {
|
|||
offset: offset,
|
||||
orderBy: orderBy?.call(CrdtDataField.t),
|
||||
orderByList: orderByList?.call(CrdtDataField.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -801,8 +801,6 @@ class CrdtDataFieldRepository {
|
|||
_i2.DatabaseSession session,
|
||||
List<CrdtDataField> rows, {
|
||||
_i2.OrderByBuilder<CrdtDataFieldTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataFieldTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
|
|
@ -811,8 +809,6 @@ class CrdtDataFieldRepository {
|
|||
rows,
|
||||
orderBy: orderBy?.call(CrdtDataField.t),
|
||||
orderByList: orderByList?.call(CrdtDataField.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -842,8 +838,6 @@ class CrdtDataFieldRepository {
|
|||
_i2.DatabaseSession session, {
|
||||
required _i2.WhereExpressionBuilder<CrdtDataFieldTable> where,
|
||||
_i2.OrderByBuilder<CrdtDataFieldTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataFieldTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
|
|
@ -852,8 +846,6 @@ class CrdtDataFieldRepository {
|
|||
where: where(CrdtDataField.t),
|
||||
orderBy: orderBy?.call(CrdtDataField.t),
|
||||
orderByList: orderByList?.call(CrdtDataField.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -899,7 +891,7 @@ class CrdtDataFieldAttachRowRepository {
|
|||
Future<void> row(
|
||||
_i2.DatabaseSession session,
|
||||
CrdtDataField crdtDataField,
|
||||
_i3.CrdtDataRow row, {
|
||||
_i4.CrdtDataRow row, {
|
||||
_i2.Transaction? transaction,
|
||||
}) async {
|
||||
if (crdtDataField.id == null) {
|
||||
|
|
@ -922,7 +914,7 @@ class CrdtDataFieldAttachRowRepository {
|
|||
Future<void> column(
|
||||
_i2.DatabaseSession session,
|
||||
CrdtDataField crdtDataField,
|
||||
_i4.CrdtSchemaColumn column, {
|
||||
_i5.CrdtSchemaColumn column, {
|
||||
_i2.Transaction? transaction,
|
||||
}) async {
|
||||
if (crdtDataField.id == null) {
|
||||
|
|
@ -945,7 +937,7 @@ class CrdtDataFieldAttachRowRepository {
|
|||
Future<void> node(
|
||||
_i2.DatabaseSession session,
|
||||
CrdtDataField crdtDataField,
|
||||
_i5.CrdtNode node, {
|
||||
_i6.CrdtNode node, {
|
||||
_i2.Transaction? transaction,
|
||||
}) async {
|
||||
if (crdtDataField.id == null) {
|
||||
|
|
@ -968,7 +960,7 @@ class CrdtDataFieldAttachRowRepository {
|
|||
Future<void> foreignKey(
|
||||
_i2.DatabaseSession session,
|
||||
CrdtDataField crdtDataField,
|
||||
_i6.CrdtDataForeignKey foreignKey, {
|
||||
_i7.CrdtDataForeignKey foreignKey, {
|
||||
_i2.Transaction? transaction,
|
||||
}) async {
|
||||
if (foreignKey.id == null) {
|
||||
|
|
@ -979,9 +971,9 @@ class CrdtDataFieldAttachRowRepository {
|
|||
}
|
||||
|
||||
var $foreignKey = foreignKey.copyWith(fieldId: crdtDataField.id);
|
||||
await session.db.updateRow<_i6.CrdtDataForeignKey>(
|
||||
await session.db.updateRow<_i7.CrdtDataForeignKey>(
|
||||
$foreignKey,
|
||||
columns: [_i6.CrdtDataForeignKey.t.fieldId],
|
||||
columns: [_i7.CrdtDataForeignKey.t.fieldId],
|
||||
transaction: transaction,
|
||||
);
|
||||
}
|
||||
|
|
@ -1013,9 +1005,9 @@ class CrdtDataFieldDetachRowRepository {
|
|||
}
|
||||
|
||||
var $$foreignKey = $foreignKey.copyWith(fieldId: null);
|
||||
await session.db.updateRow<_i6.CrdtDataForeignKey>(
|
||||
await session.db.updateRow<_i7.CrdtDataForeignKey>(
|
||||
$$foreignKey,
|
||||
columns: [_i6.CrdtDataForeignKey.t.fieldId],
|
||||
columns: [_i7.CrdtDataForeignKey.t.fieldId],
|
||||
transaction: transaction,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:serverpod_database/serverpod_database.dart' as _i1;
|
||||
import '../data/field.dart' as _i2;
|
||||
import 'package:serverpod_client/serverpod_client.dart' as _i3;
|
||||
import 'package:serverpod_client/serverpod_client.dart' as _i2;
|
||||
import '../data/field.dart' as _i3;
|
||||
import '../data/foreign_key_override_reason.dart' as _i4;
|
||||
import 'package:serverpod_offline_sync_client/src/protocol/protocol.dart'
|
||||
as _i5;
|
||||
|
|
@ -28,7 +28,8 @@ import 'package:serverpod_offline_sync_client/src/protocol/protocol.dart'
|
|||
/// facts plus this attempted FK value. The projection columns record what was
|
||||
/// materialized into the domain row; they do not decide business semantics or
|
||||
/// create user field updates during merge.
|
||||
abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
||||
abstract class CrdtDataForeignKey
|
||||
implements _i1.TableRow<int?>, _i2.ProtocolSerialization {
|
||||
CrdtDataForeignKey._({
|
||||
this.id,
|
||||
this.field,
|
||||
|
|
@ -40,10 +41,10 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
|
||||
factory CrdtDataForeignKey({
|
||||
int? id,
|
||||
_i2.CrdtDataField? field,
|
||||
_i3.CrdtDataField? field,
|
||||
required int fieldId,
|
||||
required _i3.UuidValue? attemptedValue,
|
||||
_i3.UuidValue? visibleValue,
|
||||
required _i2.UuidValue? attemptedValue,
|
||||
_i2.UuidValue? visibleValue,
|
||||
_i4.CrdtForeignKeyOverrideReason? overrideReason,
|
||||
}) = _CrdtDataForeignKeyImpl;
|
||||
|
||||
|
|
@ -52,18 +53,18 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
id: jsonSerialization['id'] as int?,
|
||||
field: jsonSerialization['field'] == null
|
||||
? null
|
||||
: _i5.Protocol().deserialize<_i2.CrdtDataField>(
|
||||
: _i5.Protocol().deserialize<_i3.CrdtDataField>(
|
||||
jsonSerialization['field'],
|
||||
),
|
||||
fieldId: jsonSerialization['fieldId'] as int,
|
||||
attemptedValue: jsonSerialization['attemptedValue'] == null
|
||||
? null
|
||||
: _i3.UuidValueJsonExtension.fromJson(
|
||||
: _i2.UuidValueJsonExtension.fromJson(
|
||||
jsonSerialization['attemptedValue'],
|
||||
),
|
||||
visibleValue: jsonSerialization['visibleValue'] == null
|
||||
? null
|
||||
: _i3.UuidValueJsonExtension.fromJson(
|
||||
: _i2.UuidValueJsonExtension.fromJson(
|
||||
jsonSerialization['visibleValue'],
|
||||
),
|
||||
overrideReason: jsonSerialization['overrideReason'] == null
|
||||
|
|
@ -82,7 +83,7 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
int? id;
|
||||
|
||||
/// The field that the foreign key belongs to.
|
||||
_i2.CrdtDataField? field;
|
||||
_i3.CrdtDataField? field;
|
||||
|
||||
int fieldId;
|
||||
|
||||
|
|
@ -90,11 +91,11 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
///
|
||||
/// This may be null for nullable foreign keys. This is durable FK field-value
|
||||
/// storage for CRDT columns whose CrdtDataField row stores only HLC metadata.
|
||||
_i3.UuidValue? attemptedValue;
|
||||
_i2.UuidValue? attemptedValue;
|
||||
|
||||
/// The foreign key value that is currently visible in the actual data row
|
||||
/// when an override is active (overrideReason is non-null).
|
||||
_i3.UuidValue? visibleValue;
|
||||
_i2.UuidValue? visibleValue;
|
||||
|
||||
/// The authoritative indicator and reason for an active projection override.
|
||||
///
|
||||
|
|
@ -109,13 +110,13 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
|
||||
/// Returns a shallow copy of this [CrdtDataForeignKey]
|
||||
/// with some or all fields replaced by the given arguments.
|
||||
@_i3.useResult
|
||||
@_i2.useResult
|
||||
CrdtDataForeignKey copyWith({
|
||||
int? id,
|
||||
_i2.CrdtDataField? field,
|
||||
_i3.CrdtDataField? field,
|
||||
int? fieldId,
|
||||
_i3.UuidValue? attemptedValue,
|
||||
_i3.UuidValue? visibleValue,
|
||||
_i2.UuidValue? attemptedValue,
|
||||
_i2.UuidValue? visibleValue,
|
||||
_i4.CrdtForeignKeyOverrideReason? overrideReason,
|
||||
});
|
||||
@override
|
||||
|
|
@ -131,7 +132,20 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
};
|
||||
}
|
||||
|
||||
static CrdtDataForeignKeyInclude include({_i2.CrdtDataFieldInclude? field}) {
|
||||
@override
|
||||
Map<String, dynamic> toJsonForProtocol() {
|
||||
return {
|
||||
'__className__': 'serverpod_offline_sync.CrdtDataForeignKey',
|
||||
if (id != null) 'id': id,
|
||||
if (field != null) 'field': field?.toJsonForProtocol(),
|
||||
'fieldId': fieldId,
|
||||
if (attemptedValue != null) 'attemptedValue': attemptedValue?.toJson(),
|
||||
if (visibleValue != null) 'visibleValue': visibleValue?.toJson(),
|
||||
if (overrideReason != null) 'overrideReason': overrideReason?.toJson(),
|
||||
};
|
||||
}
|
||||
|
||||
static CrdtDataForeignKeyInclude include({_i3.CrdtDataFieldInclude? field}) {
|
||||
return CrdtDataForeignKeyInclude._(field: field);
|
||||
}
|
||||
|
||||
|
|
@ -140,8 +154,6 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
int? limit,
|
||||
int? offset,
|
||||
_i1.OrderByBuilder<CrdtDataForeignKeyTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i1.OrderByListBuilder<CrdtDataForeignKeyTable>? orderByList,
|
||||
CrdtDataForeignKeyInclude? include,
|
||||
}) {
|
||||
|
|
@ -150,8 +162,6 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
limit: limit,
|
||||
offset: offset,
|
||||
orderBy: orderBy?.call(CrdtDataForeignKey.t),
|
||||
orderDescending: // ignore: deprecated_member_use_from_same_package
|
||||
orderDescending,
|
||||
orderByList: orderByList?.call(CrdtDataForeignKey.t),
|
||||
include: include,
|
||||
);
|
||||
|
|
@ -159,7 +169,7 @@ abstract class CrdtDataForeignKey implements _i1.TableRow<int?> {
|
|||
|
||||
@override
|
||||
String toString() {
|
||||
return _i3.SerializationManager.encode(this);
|
||||
return _i2.SerializationManager.encode(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -168,10 +178,10 @@ class _Undefined {}
|
|||
class _CrdtDataForeignKeyImpl extends CrdtDataForeignKey {
|
||||
_CrdtDataForeignKeyImpl({
|
||||
int? id,
|
||||
_i2.CrdtDataField? field,
|
||||
_i3.CrdtDataField? field,
|
||||
required int fieldId,
|
||||
required _i3.UuidValue? attemptedValue,
|
||||
_i3.UuidValue? visibleValue,
|
||||
required _i2.UuidValue? attemptedValue,
|
||||
_i2.UuidValue? visibleValue,
|
||||
_i4.CrdtForeignKeyOverrideReason? overrideReason,
|
||||
}) : super._(
|
||||
id: id,
|
||||
|
|
@ -184,7 +194,7 @@ class _CrdtDataForeignKeyImpl extends CrdtDataForeignKey {
|
|||
|
||||
/// Returns a shallow copy of this [CrdtDataForeignKey]
|
||||
/// with some or all fields replaced by the given arguments.
|
||||
@_i3.useResult
|
||||
@_i2.useResult
|
||||
@override
|
||||
CrdtDataForeignKey copyWith({
|
||||
Object? id = _Undefined,
|
||||
|
|
@ -196,12 +206,12 @@ class _CrdtDataForeignKeyImpl extends CrdtDataForeignKey {
|
|||
}) {
|
||||
return CrdtDataForeignKey(
|
||||
id: id is int? ? id : this.id,
|
||||
field: field is _i2.CrdtDataField? ? field : this.field?.copyWith(),
|
||||
field: field is _i3.CrdtDataField? ? field : this.field?.copyWith(),
|
||||
fieldId: fieldId ?? this.fieldId,
|
||||
attemptedValue: attemptedValue is _i3.UuidValue?
|
||||
attemptedValue: attemptedValue is _i2.UuidValue?
|
||||
? attemptedValue
|
||||
: this.attemptedValue,
|
||||
visibleValue: visibleValue is _i3.UuidValue?
|
||||
visibleValue: visibleValue is _i2.UuidValue?
|
||||
? visibleValue
|
||||
: this.visibleValue,
|
||||
overrideReason: overrideReason is _i4.CrdtForeignKeyOverrideReason?
|
||||
|
|
@ -220,15 +230,15 @@ class CrdtDataForeignKeyUpdateTable
|
|||
value,
|
||||
);
|
||||
|
||||
_i1.ColumnValue<_i3.UuidValue, _i3.UuidValue> attemptedValue(
|
||||
_i3.UuidValue? value,
|
||||
_i1.ColumnValue<_i2.UuidValue, _i2.UuidValue> attemptedValue(
|
||||
_i2.UuidValue? value,
|
||||
) => _i1.ColumnValue(
|
||||
table.attemptedValue,
|
||||
value,
|
||||
);
|
||||
|
||||
_i1.ColumnValue<_i3.UuidValue, _i3.UuidValue> visibleValue(
|
||||
_i3.UuidValue? value,
|
||||
_i1.ColumnValue<_i2.UuidValue, _i2.UuidValue> visibleValue(
|
||||
_i2.UuidValue? value,
|
||||
) => _i1.ColumnValue(
|
||||
table.visibleValue,
|
||||
value,
|
||||
|
|
@ -270,7 +280,7 @@ class CrdtDataForeignKeyTable extends _i1.Table<int?> {
|
|||
late final CrdtDataForeignKeyUpdateTable updateTable;
|
||||
|
||||
/// The field that the foreign key belongs to.
|
||||
_i2.CrdtDataFieldTable? _field;
|
||||
_i3.CrdtDataFieldTable? _field;
|
||||
|
||||
late final _i1.ColumnInt fieldId;
|
||||
|
||||
|
|
@ -292,15 +302,15 @@ class CrdtDataForeignKeyTable extends _i1.Table<int?> {
|
|||
/// row, field, and tombstone facts.
|
||||
late final _i1.ColumnEnum<_i4.CrdtForeignKeyOverrideReason> overrideReason;
|
||||
|
||||
_i2.CrdtDataFieldTable get field {
|
||||
_i3.CrdtDataFieldTable get field {
|
||||
if (_field != null) return _field!;
|
||||
_field = _i1.createRelationTable(
|
||||
relationFieldName: 'field',
|
||||
field: CrdtDataForeignKey.t.fieldId,
|
||||
foreignField: _i2.CrdtDataField.t.id,
|
||||
foreignField: _i3.CrdtDataField.t.id,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i2.CrdtDataFieldTable(tableRelation: foreignTableRelation),
|
||||
_i3.CrdtDataFieldTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _field!;
|
||||
}
|
||||
|
|
@ -324,11 +334,11 @@ class CrdtDataForeignKeyTable extends _i1.Table<int?> {
|
|||
}
|
||||
|
||||
class CrdtDataForeignKeyInclude extends _i1.IncludeObject {
|
||||
CrdtDataForeignKeyInclude._({_i2.CrdtDataFieldInclude? field}) {
|
||||
CrdtDataForeignKeyInclude._({_i3.CrdtDataFieldInclude? field}) {
|
||||
_field = field;
|
||||
}
|
||||
|
||||
_i2.CrdtDataFieldInclude? _field;
|
||||
_i3.CrdtDataFieldInclude? _field;
|
||||
|
||||
@override
|
||||
Map<String, _i1.Include?> get includes => {'field': _field};
|
||||
|
|
@ -343,8 +353,6 @@ class CrdtDataForeignKeyIncludeList extends _i1.IncludeList {
|
|||
super.limit,
|
||||
super.offset,
|
||||
super.orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
super.orderDescending,
|
||||
super.orderByList,
|
||||
super.include,
|
||||
}) {
|
||||
|
|
@ -391,8 +399,6 @@ class CrdtDataForeignKeyRepository {
|
|||
int? limit,
|
||||
int? offset,
|
||||
_i1.OrderByBuilder<CrdtDataForeignKeyTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i1.OrderByListBuilder<CrdtDataForeignKeyTable>? orderByList,
|
||||
_i1.Transaction? transaction,
|
||||
CrdtDataForeignKeyInclude? include,
|
||||
|
|
@ -403,8 +409,6 @@ class CrdtDataForeignKeyRepository {
|
|||
where: where?.call(CrdtDataForeignKey.t),
|
||||
orderBy: orderBy?.call(CrdtDataForeignKey.t),
|
||||
orderByList: orderByList?.call(CrdtDataForeignKey.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
transaction: transaction,
|
||||
|
|
@ -436,8 +440,6 @@ class CrdtDataForeignKeyRepository {
|
|||
_i1.WhereExpressionBuilder<CrdtDataForeignKeyTable>? where,
|
||||
int? offset,
|
||||
_i1.OrderByBuilder<CrdtDataForeignKeyTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i1.OrderByListBuilder<CrdtDataForeignKeyTable>? orderByList,
|
||||
_i1.Transaction? transaction,
|
||||
CrdtDataForeignKeyInclude? include,
|
||||
|
|
@ -448,8 +450,6 @@ class CrdtDataForeignKeyRepository {
|
|||
where: where?.call(CrdtDataForeignKey.t),
|
||||
orderBy: orderBy?.call(CrdtDataForeignKey.t),
|
||||
orderByList: orderByList?.call(CrdtDataForeignKey.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
offset: offset,
|
||||
transaction: transaction,
|
||||
include: include,
|
||||
|
|
@ -659,8 +659,6 @@ class CrdtDataForeignKeyRepository {
|
|||
int? offset,
|
||||
_i1.OrderByBuilder<CrdtDataForeignKeyTable>? orderBy,
|
||||
_i1.OrderByListBuilder<CrdtDataForeignKeyTable>? orderByList,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i1.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
}) async {
|
||||
|
|
@ -671,8 +669,6 @@ class CrdtDataForeignKeyRepository {
|
|||
offset: offset,
|
||||
orderBy: orderBy?.call(CrdtDataForeignKey.t),
|
||||
orderByList: orderByList?.call(CrdtDataForeignKey.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -693,8 +689,6 @@ class CrdtDataForeignKeyRepository {
|
|||
_i1.DatabaseSession session,
|
||||
List<CrdtDataForeignKey> rows, {
|
||||
_i1.OrderByBuilder<CrdtDataForeignKeyTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i1.OrderByListBuilder<CrdtDataForeignKeyTable>? orderByList,
|
||||
_i1.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
|
|
@ -703,8 +697,6 @@ class CrdtDataForeignKeyRepository {
|
|||
rows,
|
||||
orderBy: orderBy?.call(CrdtDataForeignKey.t),
|
||||
orderByList: orderByList?.call(CrdtDataForeignKey.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -734,8 +726,6 @@ class CrdtDataForeignKeyRepository {
|
|||
_i1.DatabaseSession session, {
|
||||
required _i1.WhereExpressionBuilder<CrdtDataForeignKeyTable> where,
|
||||
_i1.OrderByBuilder<CrdtDataForeignKeyTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i1.OrderByListBuilder<CrdtDataForeignKeyTable>? orderByList,
|
||||
_i1.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
|
|
@ -744,8 +734,6 @@ class CrdtDataForeignKeyRepository {
|
|||
where: where(CrdtDataForeignKey.t),
|
||||
orderBy: orderBy?.call(CrdtDataForeignKey.t),
|
||||
orderByList: orderByList?.call(CrdtDataForeignKey.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -791,7 +779,7 @@ class CrdtDataForeignKeyAttachRowRepository {
|
|||
Future<void> field(
|
||||
_i1.DatabaseSession session,
|
||||
CrdtDataForeignKey crdtDataForeignKey,
|
||||
_i2.CrdtDataField field, {
|
||||
_i3.CrdtDataField field, {
|
||||
_i1.Transaction? transaction,
|
||||
}) async {
|
||||
if (crdtDataForeignKey.id == null) {
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:serverpod_offline_sync/serverpod_offline_sync.dart' as _i1;
|
||||
import 'package:serverpod_database/serverpod_database.dart' as _i2;
|
||||
import '../data/row_visibility.dart' as _i3;
|
||||
import '../node/scope.dart' as _i4;
|
||||
import '../schema/table.dart' as _i5;
|
||||
import 'package:serverpod_client/serverpod_client.dart' as _i6;
|
||||
import 'package:serverpod_client/serverpod_client.dart' as _i3;
|
||||
import '../data/row_visibility.dart' as _i4;
|
||||
import '../node/scope.dart' as _i5;
|
||||
import '../schema/table.dart' as _i6;
|
||||
import '../node/node.dart' as _i7;
|
||||
import '../data/deleted.dart' as _i8;
|
||||
import '../data/field.dart' as _i9;
|
||||
|
|
@ -30,7 +30,8 @@ import 'package:serverpod_offline_sync_client/src/protocol/protocol.dart'
|
|||
///
|
||||
/// The row is also the HLC timestamp for when it was inserted. This is used to
|
||||
/// avoid creating one entry per field until a field is updated.
|
||||
abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
||||
abstract class CrdtDataRow extends _i1.BaseHlc
|
||||
implements _i2.TableRow<int?>, _i3.ProtocolSerialization {
|
||||
CrdtDataRow._({
|
||||
this.id,
|
||||
required super.hlcDatetime,
|
||||
|
|
@ -42,23 +43,23 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
required this.uuidRowId,
|
||||
required this.nodeId,
|
||||
this.node,
|
||||
_i3.CrdtDataRowVisibility? visibility,
|
||||
_i4.CrdtDataRowVisibility? visibility,
|
||||
this.deleted,
|
||||
this.fields,
|
||||
}) : visibility = visibility ?? _i3.CrdtDataRowVisibility.userInsert;
|
||||
}) : visibility = visibility ?? _i4.CrdtDataRowVisibility.userInsert;
|
||||
|
||||
factory CrdtDataRow({
|
||||
int? id,
|
||||
required DateTime hlcDatetime,
|
||||
required int hlcCounter,
|
||||
required int scopeId,
|
||||
_i4.CrdtScope? scope,
|
||||
_i5.CrdtScope? scope,
|
||||
required int tblId,
|
||||
_i5.CrdtSchemaTable? tbl,
|
||||
required _i6.UuidValue uuidRowId,
|
||||
_i6.CrdtSchemaTable? tbl,
|
||||
required _i3.UuidValue uuidRowId,
|
||||
required int nodeId,
|
||||
_i7.CrdtNode? node,
|
||||
_i3.CrdtDataRowVisibility? visibility,
|
||||
_i4.CrdtDataRowVisibility? visibility,
|
||||
_i8.CrdtDataDeleted? deleted,
|
||||
List<_i9.CrdtDataField>? fields,
|
||||
}) = _CrdtDataRowImpl;
|
||||
|
|
@ -66,23 +67,23 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
factory CrdtDataRow.fromJson(Map<String, dynamic> jsonSerialization) {
|
||||
return CrdtDataRow(
|
||||
id: jsonSerialization['id'] as int?,
|
||||
hlcDatetime: _i6.DateTimeJsonExtension.fromJson(
|
||||
hlcDatetime: _i3.DateTimeJsonExtension.fromJson(
|
||||
jsonSerialization['hlcDatetime'],
|
||||
),
|
||||
hlcCounter: jsonSerialization['hlcCounter'] as int,
|
||||
scopeId: jsonSerialization['scopeId'] as int,
|
||||
scope: jsonSerialization['scope'] == null
|
||||
? null
|
||||
: _i10.Protocol().deserialize<_i4.CrdtScope>(
|
||||
: _i10.Protocol().deserialize<_i5.CrdtScope>(
|
||||
jsonSerialization['scope'],
|
||||
),
|
||||
tblId: jsonSerialization['tblId'] as int,
|
||||
tbl: jsonSerialization['tbl'] == null
|
||||
? null
|
||||
: _i10.Protocol().deserialize<_i5.CrdtSchemaTable>(
|
||||
: _i10.Protocol().deserialize<_i6.CrdtSchemaTable>(
|
||||
jsonSerialization['tbl'],
|
||||
),
|
||||
uuidRowId: _i6.UuidValueJsonExtension.fromJson(
|
||||
uuidRowId: _i3.UuidValueJsonExtension.fromJson(
|
||||
jsonSerialization['uuidRowId'],
|
||||
),
|
||||
nodeId: jsonSerialization['nodeId'] as int,
|
||||
|
|
@ -93,7 +94,7 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
),
|
||||
visibility: jsonSerialization['visibility'] == null
|
||||
? null
|
||||
: _i3.CrdtDataRowVisibility.fromJson(
|
||||
: _i4.CrdtDataRowVisibility.fromJson(
|
||||
(jsonSerialization['visibility'] as int),
|
||||
),
|
||||
deleted: jsonSerialization['deleted'] == null
|
||||
|
|
@ -119,15 +120,15 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
int scopeId;
|
||||
|
||||
/// Identifier for the scope that owns the data.
|
||||
_i4.CrdtScope? scope;
|
||||
_i5.CrdtScope? scope;
|
||||
|
||||
int tblId;
|
||||
|
||||
/// Reference to the table this row belongs to.
|
||||
_i5.CrdtSchemaTable? tbl;
|
||||
_i6.CrdtSchemaTable? tbl;
|
||||
|
||||
/// Row identifier.
|
||||
_i6.UuidValue uuidRowId;
|
||||
_i3.UuidValue uuidRowId;
|
||||
|
||||
int nodeId;
|
||||
|
||||
|
|
@ -138,7 +139,7 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
///
|
||||
/// Updated by user tombstone writes and foreign key projection. Visible
|
||||
/// states are listed before hidden states in CrdtDataRowVisibility.
|
||||
_i3.CrdtDataRowVisibility visibility;
|
||||
_i4.CrdtDataRowVisibility visibility;
|
||||
|
||||
/// The synced user tombstone for this row.
|
||||
///
|
||||
|
|
@ -155,19 +156,19 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
/// Returns a shallow copy of this [CrdtDataRow]
|
||||
/// with some or all fields replaced by the given arguments.
|
||||
@override
|
||||
@_i6.useResult
|
||||
@_i3.useResult
|
||||
CrdtDataRow copyWith({
|
||||
int? id,
|
||||
DateTime? hlcDatetime,
|
||||
int? hlcCounter,
|
||||
int? scopeId,
|
||||
_i4.CrdtScope? scope,
|
||||
_i5.CrdtScope? scope,
|
||||
int? tblId,
|
||||
_i5.CrdtSchemaTable? tbl,
|
||||
_i6.UuidValue? uuidRowId,
|
||||
_i6.CrdtSchemaTable? tbl,
|
||||
_i3.UuidValue? uuidRowId,
|
||||
int? nodeId,
|
||||
_i7.CrdtNode? node,
|
||||
_i3.CrdtDataRowVisibility? visibility,
|
||||
_i4.CrdtDataRowVisibility? visibility,
|
||||
_i8.CrdtDataDeleted? deleted,
|
||||
List<_i9.CrdtDataField>? fields,
|
||||
});
|
||||
|
|
@ -192,9 +193,30 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
};
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJsonForProtocol() {
|
||||
return {
|
||||
'__className__': 'serverpod_offline_sync.CrdtDataRow',
|
||||
if (id != null) 'id': id,
|
||||
'hlcDatetime': hlcDatetime.toJson(),
|
||||
'hlcCounter': hlcCounter,
|
||||
'scopeId': scopeId,
|
||||
if (scope != null) 'scope': scope?.toJsonForProtocol(),
|
||||
'tblId': tblId,
|
||||
if (tbl != null) 'tbl': tbl?.toJsonForProtocol(),
|
||||
'uuidRowId': uuidRowId.toJson(),
|
||||
'nodeId': nodeId,
|
||||
if (node != null) 'node': node?.toJsonForProtocol(),
|
||||
'visibility': visibility.toJson(),
|
||||
if (deleted != null) 'deleted': deleted?.toJsonForProtocol(),
|
||||
if (fields != null)
|
||||
'fields': fields?.toJson(valueToJson: (v) => v.toJsonForProtocol()),
|
||||
};
|
||||
}
|
||||
|
||||
static CrdtDataRowInclude include({
|
||||
_i4.CrdtScopeInclude? scope,
|
||||
_i5.CrdtSchemaTableInclude? tbl,
|
||||
_i5.CrdtScopeInclude? scope,
|
||||
_i6.CrdtSchemaTableInclude? tbl,
|
||||
_i7.CrdtNodeInclude? node,
|
||||
_i8.CrdtDataDeletedInclude? deleted,
|
||||
_i9.CrdtDataFieldIncludeList? fields,
|
||||
|
|
@ -213,8 +235,6 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
int? limit,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataRowTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataRowTable>? orderByList,
|
||||
CrdtDataRowInclude? include,
|
||||
}) {
|
||||
|
|
@ -223,8 +243,6 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
limit: limit,
|
||||
offset: offset,
|
||||
orderBy: orderBy?.call(CrdtDataRow.t),
|
||||
orderDescending: // ignore: deprecated_member_use_from_same_package
|
||||
orderDescending,
|
||||
orderByList: orderByList?.call(CrdtDataRow.t),
|
||||
include: include,
|
||||
);
|
||||
|
|
@ -232,7 +250,7 @@ abstract class CrdtDataRow extends _i1.BaseHlc implements _i2.TableRow<int?> {
|
|||
|
||||
@override
|
||||
String toString() {
|
||||
return _i6.SerializationManager.encode(this);
|
||||
return _i3.SerializationManager.encode(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -244,13 +262,13 @@ class _CrdtDataRowImpl extends CrdtDataRow {
|
|||
required DateTime hlcDatetime,
|
||||
required int hlcCounter,
|
||||
required int scopeId,
|
||||
_i4.CrdtScope? scope,
|
||||
_i5.CrdtScope? scope,
|
||||
required int tblId,
|
||||
_i5.CrdtSchemaTable? tbl,
|
||||
required _i6.UuidValue uuidRowId,
|
||||
_i6.CrdtSchemaTable? tbl,
|
||||
required _i3.UuidValue uuidRowId,
|
||||
required int nodeId,
|
||||
_i7.CrdtNode? node,
|
||||
_i3.CrdtDataRowVisibility? visibility,
|
||||
_i4.CrdtDataRowVisibility? visibility,
|
||||
_i8.CrdtDataDeleted? deleted,
|
||||
List<_i9.CrdtDataField>? fields,
|
||||
}) : super._(
|
||||
|
|
@ -271,7 +289,7 @@ class _CrdtDataRowImpl extends CrdtDataRow {
|
|||
|
||||
/// Returns a shallow copy of this [CrdtDataRow]
|
||||
/// with some or all fields replaced by the given arguments.
|
||||
@_i6.useResult
|
||||
@_i3.useResult
|
||||
@override
|
||||
CrdtDataRow copyWith({
|
||||
Object? id = _Undefined,
|
||||
|
|
@ -281,10 +299,10 @@ class _CrdtDataRowImpl extends CrdtDataRow {
|
|||
Object? scope = _Undefined,
|
||||
int? tblId,
|
||||
Object? tbl = _Undefined,
|
||||
_i6.UuidValue? uuidRowId,
|
||||
_i3.UuidValue? uuidRowId,
|
||||
int? nodeId,
|
||||
Object? node = _Undefined,
|
||||
_i3.CrdtDataRowVisibility? visibility,
|
||||
_i4.CrdtDataRowVisibility? visibility,
|
||||
Object? deleted = _Undefined,
|
||||
Object? fields = _Undefined,
|
||||
}) {
|
||||
|
|
@ -293,9 +311,9 @@ class _CrdtDataRowImpl extends CrdtDataRow {
|
|||
hlcDatetime: hlcDatetime ?? this.hlcDatetime,
|
||||
hlcCounter: hlcCounter ?? this.hlcCounter,
|
||||
scopeId: scopeId ?? this.scopeId,
|
||||
scope: scope is _i4.CrdtScope? ? scope : this.scope?.copyWith(),
|
||||
scope: scope is _i5.CrdtScope? ? scope : this.scope?.copyWith(),
|
||||
tblId: tblId ?? this.tblId,
|
||||
tbl: tbl is _i5.CrdtSchemaTable? ? tbl : this.tbl?.copyWith(),
|
||||
tbl: tbl is _i6.CrdtSchemaTable? ? tbl : this.tbl?.copyWith(),
|
||||
uuidRowId: uuidRowId ?? this.uuidRowId,
|
||||
nodeId: nodeId ?? this.nodeId,
|
||||
node: node is _i7.CrdtNode? ? node : this.node?.copyWith(),
|
||||
|
|
@ -334,8 +352,8 @@ class CrdtDataRowUpdateTable extends _i2.UpdateTable<CrdtDataRowTable> {
|
|||
value,
|
||||
);
|
||||
|
||||
_i2.ColumnValue<_i6.UuidValue, _i6.UuidValue> uuidRowId(
|
||||
_i6.UuidValue value,
|
||||
_i2.ColumnValue<_i3.UuidValue, _i3.UuidValue> uuidRowId(
|
||||
_i3.UuidValue value,
|
||||
) => _i2.ColumnValue(
|
||||
table.uuidRowId,
|
||||
value,
|
||||
|
|
@ -346,8 +364,8 @@ class CrdtDataRowUpdateTable extends _i2.UpdateTable<CrdtDataRowTable> {
|
|||
value,
|
||||
);
|
||||
|
||||
_i2.ColumnValue<_i3.CrdtDataRowVisibility, _i3.CrdtDataRowVisibility>
|
||||
visibility(_i3.CrdtDataRowVisibility value) => _i2.ColumnValue(
|
||||
_i2.ColumnValue<_i4.CrdtDataRowVisibility, _i4.CrdtDataRowVisibility>
|
||||
visibility(_i4.CrdtDataRowVisibility value) => _i2.ColumnValue(
|
||||
table.visibility,
|
||||
value,
|
||||
);
|
||||
|
|
@ -399,12 +417,12 @@ class CrdtDataRowTable extends _i2.Table<int?> {
|
|||
late final _i2.ColumnInt scopeId;
|
||||
|
||||
/// Identifier for the scope that owns the data.
|
||||
_i4.CrdtScopeTable? _scope;
|
||||
_i5.CrdtScopeTable? _scope;
|
||||
|
||||
late final _i2.ColumnInt tblId;
|
||||
|
||||
/// Reference to the table this row belongs to.
|
||||
_i5.CrdtSchemaTableTable? _tbl;
|
||||
_i6.CrdtSchemaTableTable? _tbl;
|
||||
|
||||
/// Row identifier.
|
||||
late final _i2.ColumnUuid uuidRowId;
|
||||
|
|
@ -418,7 +436,7 @@ class CrdtDataRowTable extends _i2.Table<int?> {
|
|||
///
|
||||
/// Updated by user tombstone writes and foreign key projection. Visible
|
||||
/// states are listed before hidden states in CrdtDataRowVisibility.
|
||||
late final _i2.ColumnEnum<_i3.CrdtDataRowVisibility> visibility;
|
||||
late final _i2.ColumnEnum<_i4.CrdtDataRowVisibility> visibility;
|
||||
|
||||
/// The synced user tombstone for this row.
|
||||
///
|
||||
|
|
@ -432,28 +450,28 @@ class CrdtDataRowTable extends _i2.Table<int?> {
|
|||
/// The fields for this row.
|
||||
_i2.ManyRelation<_i9.CrdtDataFieldTable>? _fields;
|
||||
|
||||
_i4.CrdtScopeTable get scope {
|
||||
_i5.CrdtScopeTable get scope {
|
||||
if (_scope != null) return _scope!;
|
||||
_scope = _i2.createRelationTable(
|
||||
relationFieldName: 'scope',
|
||||
field: CrdtDataRow.t.scopeId,
|
||||
foreignField: _i4.CrdtScope.t.id,
|
||||
foreignField: _i5.CrdtScope.t.id,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i4.CrdtScopeTable(tableRelation: foreignTableRelation),
|
||||
_i5.CrdtScopeTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _scope!;
|
||||
}
|
||||
|
||||
_i5.CrdtSchemaTableTable get tbl {
|
||||
_i6.CrdtSchemaTableTable get tbl {
|
||||
if (_tbl != null) return _tbl!;
|
||||
_tbl = _i2.createRelationTable(
|
||||
relationFieldName: 'tbl',
|
||||
field: CrdtDataRow.t.tblId,
|
||||
foreignField: _i5.CrdtSchemaTable.t.id,
|
||||
foreignField: _i6.CrdtSchemaTable.t.id,
|
||||
tableRelation: tableRelation,
|
||||
createTable: (foreignTableRelation) =>
|
||||
_i5.CrdtSchemaTableTable(tableRelation: foreignTableRelation),
|
||||
_i6.CrdtSchemaTableTable(tableRelation: foreignTableRelation),
|
||||
);
|
||||
return _tbl!;
|
||||
}
|
||||
|
|
@ -551,8 +569,8 @@ class CrdtDataRowTable extends _i2.Table<int?> {
|
|||
|
||||
class CrdtDataRowInclude extends _i2.IncludeObject {
|
||||
CrdtDataRowInclude._({
|
||||
_i4.CrdtScopeInclude? scope,
|
||||
_i5.CrdtSchemaTableInclude? tbl,
|
||||
_i5.CrdtScopeInclude? scope,
|
||||
_i6.CrdtSchemaTableInclude? tbl,
|
||||
_i7.CrdtNodeInclude? node,
|
||||
_i8.CrdtDataDeletedInclude? deleted,
|
||||
_i9.CrdtDataFieldIncludeList? fields,
|
||||
|
|
@ -564,9 +582,9 @@ class CrdtDataRowInclude extends _i2.IncludeObject {
|
|||
_fields = fields;
|
||||
}
|
||||
|
||||
_i4.CrdtScopeInclude? _scope;
|
||||
_i5.CrdtScopeInclude? _scope;
|
||||
|
||||
_i5.CrdtSchemaTableInclude? _tbl;
|
||||
_i6.CrdtSchemaTableInclude? _tbl;
|
||||
|
||||
_i7.CrdtNodeInclude? _node;
|
||||
|
||||
|
|
@ -593,8 +611,6 @@ class CrdtDataRowIncludeList extends _i2.IncludeList {
|
|||
super.limit,
|
||||
super.offset,
|
||||
super.orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
super.orderDescending,
|
||||
super.orderByList,
|
||||
super.include,
|
||||
}) {
|
||||
|
|
@ -643,8 +659,6 @@ class CrdtDataRowRepository {
|
|||
int? limit,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataRowTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataRowTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
CrdtDataRowInclude? include,
|
||||
|
|
@ -655,8 +669,6 @@ class CrdtDataRowRepository {
|
|||
where: where?.call(CrdtDataRow.t),
|
||||
orderBy: orderBy?.call(CrdtDataRow.t),
|
||||
orderByList: orderByList?.call(CrdtDataRow.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
transaction: transaction,
|
||||
|
|
@ -688,8 +700,6 @@ class CrdtDataRowRepository {
|
|||
_i2.WhereExpressionBuilder<CrdtDataRowTable>? where,
|
||||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataRowTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataRowTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
CrdtDataRowInclude? include,
|
||||
|
|
@ -700,8 +710,6 @@ class CrdtDataRowRepository {
|
|||
where: where?.call(CrdtDataRow.t),
|
||||
orderBy: orderBy?.call(CrdtDataRow.t),
|
||||
orderByList: orderByList?.call(CrdtDataRow.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
offset: offset,
|
||||
transaction: transaction,
|
||||
include: include,
|
||||
|
|
@ -909,8 +917,6 @@ class CrdtDataRowRepository {
|
|||
int? offset,
|
||||
_i2.OrderByBuilder<CrdtDataRowTable>? orderBy,
|
||||
_i2.OrderByListBuilder<CrdtDataRowTable>? orderByList,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
}) async {
|
||||
|
|
@ -921,8 +927,6 @@ class CrdtDataRowRepository {
|
|||
offset: offset,
|
||||
orderBy: orderBy?.call(CrdtDataRow.t),
|
||||
orderByList: orderByList?.call(CrdtDataRow.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -943,8 +947,6 @@ class CrdtDataRowRepository {
|
|||
_i2.DatabaseSession session,
|
||||
List<CrdtDataRow> rows, {
|
||||
_i2.OrderByBuilder<CrdtDataRowTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataRowTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
|
|
@ -953,8 +955,6 @@ class CrdtDataRowRepository {
|
|||
rows,
|
||||
orderBy: orderBy?.call(CrdtDataRow.t),
|
||||
orderByList: orderByList?.call(CrdtDataRow.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -984,8 +984,6 @@ class CrdtDataRowRepository {
|
|||
_i2.DatabaseSession session, {
|
||||
required _i2.WhereExpressionBuilder<CrdtDataRowTable> where,
|
||||
_i2.OrderByBuilder<CrdtDataRowTable>? orderBy,
|
||||
@Deprecated('Use desc() on the orderBy column instead.')
|
||||
bool orderDescending = false,
|
||||
_i2.OrderByListBuilder<CrdtDataRowTable>? orderByList,
|
||||
_i2.Transaction? transaction,
|
||||
bool noReturn = false,
|
||||
|
|
@ -994,8 +992,6 @@ class CrdtDataRowRepository {
|
|||
where: where(CrdtDataRow.t),
|
||||
orderBy: orderBy?.call(CrdtDataRow.t),
|
||||
orderByList: orderByList?.call(CrdtDataRow.t),
|
||||
orderDescending: // ignore: deprecated_member_use
|
||||
orderDescending,
|
||||
transaction: transaction,
|
||||
noReturn: noReturn,
|
||||
);
|
||||
|
|
@ -1070,7 +1066,7 @@ class CrdtDataRowAttachRowRepository {
|
|||
Future<void> scope(
|
||||
_i2.DatabaseSession session,
|
||||
CrdtDataRow crdtDataRow,
|
||||
_i4.CrdtScope scope, {
|
||||
_i5.CrdtScope scope, {
|
||||
_i2.Transaction? transaction,
|
||||
}) async {
|
||||
if (crdtDataRow.id == null) {
|
||||
|
|
@ -1093,7 +1089,7 @@ class CrdtDataRowAttachRowRepository {
|
|||
Future<void> tbl(
|
||||
_i2.DatabaseSession session,
|
||||
CrdtDataRow crdtDataRow,
|
||||
_i5.CrdtSchemaTable tbl, {
|
||||
_i6.CrdtSchemaTable tbl, {
|
||||
_i2.Transaction? transaction,
|
||||
}) async {
|
||||
if (crdtDataRow.id == null) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue