@@ -102,18 +102,24 @@ class _NetCoreSyncKnowledgesCompanion
102102 final Value <String > id;
103103 final Value <bool > local;
104104 final Value <int > maxTimeStamp;
105+ final Value <String > syncId;
105106 const _NetCoreSyncKnowledgesCompanion ({
106107 this .id = const Value .absent (),
107108 this .local = const Value .absent (),
108109 this .maxTimeStamp = const Value .absent (),
110+ this .syncId = const Value .absent (),
109111 });
110112
111113 _NetCoreSyncKnowledgesCompanion copyWith (
112- {Value <String >? id, Value <bool >? local, Value <int >? maxTimeStamp}) {
114+ {Value <String >? id,
115+ Value <bool >? local,
116+ Value <int >? maxTimeStamp,
117+ Value <String >? syncId}) {
113118 return _NetCoreSyncKnowledgesCompanion (
114119 id: id ?? this .id,
115120 local: local ?? this .local,
116121 maxTimeStamp: maxTimeStamp ?? this .maxTimeStamp,
122+ syncId: syncId ?? this .syncId,
117123 );
118124 }
119125
@@ -129,15 +135,19 @@ class _NetCoreSyncKnowledgesCompanion
129135 if (maxTimeStamp.present) {
130136 map['max_time_stamp' ] = Variable <int >(maxTimeStamp.value);
131137 }
138+ if (syncId.present) {
139+ map['sync_id' ] = Variable <String >(syncId.value);
140+ }
132141 return map;
133142 }
134143
135144 @override
136145 String toString () {
137- return (StringBuffer ('_NetCoreSyncKnowledgesCompanion (' )
146+ return (StringBuffer ('NetCoreSyncKnowledgesCompanion (' )
138147 ..write ('id: $id , ' )
139148 ..write ('local: $local , ' )
140- ..write ('maxTimeStamp: $maxTimeStamp ' )
149+ ..write ('maxTimeStamp: $maxTimeStamp , ' )
150+ ..write ('syncId: $syncId ' )
141151 ..write (')' ))
142152 .toString ();
143153 }
@@ -168,8 +178,15 @@ class _NetCoreSyncKnowledgesTable extends NetCoreSyncKnowledges
168178 late final GeneratedColumn <int ?> maxTimeStamp = GeneratedColumn <int ?>(
169179 'max_time_stamp' , aliasedName, false ,
170180 typeName: 'INTEGER' , requiredDuringInsert: true );
181+ final VerificationMeta _syncIdMeta = const VerificationMeta ('syncId' );
182+ @override
183+ late final GeneratedColumn <String ?> syncId = GeneratedColumn <String ?>(
184+ 'sync_id' , aliasedName, false ,
185+ additionalChecks: GeneratedColumn .checkTextLength (maxTextLength: 255 ),
186+ typeName: 'TEXT' ,
187+ requiredDuringInsert: true );
171188 @override
172- List <GeneratedColumn > get $columns => [id, local, maxTimeStamp];
189+ List <GeneratedColumn > get $columns => [id, local, maxTimeStamp, syncId ];
173190 @override
174191 String get aliasedName => _alias ?? 'netcoresync_knowledges' ;
175192 @override
@@ -199,6 +216,12 @@ class _NetCoreSyncKnowledgesTable extends NetCoreSyncKnowledges
199216 } else if (isInserting) {
200217 context.missing (_maxTimeStampMeta);
201218 }
219+ if (data.containsKey ('sync_id' )) {
220+ context.handle (_syncIdMeta,
221+ syncId.isAcceptableOrUnknown (data['sync_id' ]! , _syncIdMeta));
222+ } else if (isInserting) {
223+ context.missing (_syncIdMeta);
224+ }
202225 return context;
203226 }
204227
@@ -214,6 +237,8 @@ class _NetCoreSyncKnowledgesTable extends NetCoreSyncKnowledges
214237 .mapFromDatabaseResponse (data['${effectivePrefix }local' ])! ,
215238 maxTimeStamp: const IntType ()
216239 .mapFromDatabaseResponse (data['${effectivePrefix }max_time_stamp' ])! ,
240+ syncId: const StringType ()
241+ .mapFromDatabaseResponse (data['${effectivePrefix }sync_id' ])! ,
217242 );
218243 }
219244
@@ -222,3 +247,158 @@ class _NetCoreSyncKnowledgesTable extends NetCoreSyncKnowledges
222247 return _NetCoreSyncKnowledgesTable (_db, alias);
223248 }
224249}
250+
251+ // class _NetCoreSyncKnowledgesCompanion
252+ // extends UpdateCompanion<NetCoreSyncKnowledge> {
253+ // final Value<String> id;
254+ // final Value<bool> local;
255+ // final Value<int> maxTimeStamp;
256+ // final Value<String> synchronizationId;
257+ // const _NetCoreSyncKnowledgesCompanion({
258+ // this.id = const Value.absent(),
259+ // this.local = const Value.absent(),
260+ // this.maxTimeStamp = const Value.absent(),
261+ // this.synchronizationId = const Value.absent(),
262+ // });
263+
264+ // _NetCoreSyncKnowledgesCompanion copyWith(
265+ // {Value<String>? id,
266+ // Value<bool>? local,
267+ // Value<int>? maxTimeStamp,
268+ // Value<String>? synchronizationId}) {
269+ // return _NetCoreSyncKnowledgesCompanion(
270+ // id: id ?? this.id,
271+ // local: local ?? this.local,
272+ // maxTimeStamp: maxTimeStamp ?? this.maxTimeStamp,
273+ // synchronizationId: synchronizationId ?? this.synchronizationId,
274+ // );
275+ // }
276+
277+ // @override
278+ // Map<String, Expression> toColumns(bool nullToAbsent) {
279+ // final map = <String, Expression>{};
280+ // if (id.present) {
281+ // map['id'] = Variable<String>(id.value);
282+ // }
283+ // if (local.present) {
284+ // map['local'] = Variable<bool>(local.value);
285+ // }
286+ // if (maxTimeStamp.present) {
287+ // map['max_time_stamp'] = Variable<int>(maxTimeStamp.value);
288+ // }
289+ // if (synchronizationId.present) {
290+ // map['synchronization_id'] = Variable<String>(synchronizationId.value);
291+ // }
292+ // return map;
293+ // }
294+
295+ // @override
296+ // String toString() {
297+ // return (StringBuffer('NetCoreSyncKnowledgesCompanion(')
298+ // ..write('id: $id, ')
299+ // ..write('local: $local, ')
300+ // ..write('maxTimeStamp: $maxTimeStamp, ')
301+ // ..write('synchronizationId: $synchronizationId')
302+ // ..write(')'))
303+ // .toString();
304+ // }
305+ // }
306+
307+ // class _NetCoreSyncKnowledgesTable extends NetCoreSyncKnowledges
308+ // with TableInfo<_NetCoreSyncKnowledgesTable, NetCoreSyncKnowledge> {
309+ // final GeneratedDatabase _db;
310+ // final String? _alias;
311+ // _NetCoreSyncKnowledgesTable(this._db, [this._alias]);
312+ // final VerificationMeta _idMeta = const VerificationMeta('id');
313+ // @override
314+ // late final GeneratedColumn<String?> id = GeneratedColumn<String?>(
315+ // 'id', aliasedName, false,
316+ // additionalChecks: GeneratedColumn.checkTextLength(maxTextLength: 36),
317+ // typeName: 'TEXT',
318+ // requiredDuringInsert: true);
319+ // final VerificationMeta _localMeta = const VerificationMeta('local');
320+ // @override
321+ // late final GeneratedColumn<bool?> local = GeneratedColumn<bool?>(
322+ // 'local', aliasedName, false,
323+ // typeName: 'INTEGER',
324+ // requiredDuringInsert: true,
325+ // defaultConstraints: 'CHECK (local IN (0, 1))');
326+ // final VerificationMeta _maxTimeStampMeta =
327+ // const VerificationMeta('maxTimeStamp');
328+ // @override
329+ // late final GeneratedColumn<int?> maxTimeStamp = GeneratedColumn<int?>(
330+ // 'max_time_stamp', aliasedName, false,
331+ // typeName: 'INTEGER', requiredDuringInsert: true);
332+ // final VerificationMeta _synchronizationIdMeta =
333+ // const VerificationMeta('synchronizationId');
334+ // @override
335+ // late final GeneratedColumn<String?> synchronizationId =
336+ // GeneratedColumn<String?>('synchronization_id', aliasedName, false,
337+ // additionalChecks: GeneratedColumn.checkTextLength(maxTextLength: 255),
338+ // typeName: 'TEXT',
339+ // requiredDuringInsert: true);
340+ // @override
341+ // List<GeneratedColumn> get $columns =>
342+ // [id, local, maxTimeStamp, synchronizationId];
343+ // @override
344+ // String get aliasedName => _alias ?? 'netcoresync_knowledges';
345+ // @override
346+ // String get actualTableName => 'netcoresync_knowledges';
347+ // @override
348+ // VerificationContext validateIntegrity(
349+ // Insertable<NetCoreSyncKnowledge> instance,
350+ // {bool isInserting = false}) {
351+ // final context = VerificationContext();
352+ // final data = instance.toColumns(true);
353+ // if (data.containsKey('id')) {
354+ // context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
355+ // } else if (isInserting) {
356+ // context.missing(_idMeta);
357+ // }
358+ // if (data.containsKey('local')) {
359+ // context.handle(
360+ // _localMeta, local.isAcceptableOrUnknown(data['local']!, _localMeta));
361+ // } else if (isInserting) {
362+ // context.missing(_localMeta);
363+ // }
364+ // if (data.containsKey('max_time_stamp')) {
365+ // context.handle(
366+ // _maxTimeStampMeta,
367+ // maxTimeStamp.isAcceptableOrUnknown(
368+ // data['max_time_stamp']!, _maxTimeStampMeta));
369+ // } else if (isInserting) {
370+ // context.missing(_maxTimeStampMeta);
371+ // }
372+ // if (data.containsKey('synchronization_id')) {
373+ // context.handle(
374+ // _synchronizationIdMeta,
375+ // synchronizationId.isAcceptableOrUnknown(
376+ // data['synchronization_id']!, _synchronizationIdMeta));
377+ // } else if (isInserting) {
378+ // context.missing(_synchronizationIdMeta);
379+ // }
380+ // return context;
381+ // }
382+
383+ // @override
384+ // Set<GeneratedColumn> get $primaryKey => {id};
385+ // @override
386+ // NetCoreSyncKnowledge map(Map<String, dynamic> data, {String? tablePrefix}) {
387+ // final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
388+ // return NetCoreSyncKnowledge.fromDb(
389+ // id: const StringType()
390+ // .mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
391+ // local: const BoolType()
392+ // .mapFromDatabaseResponse(data['${effectivePrefix}local'])!,
393+ // maxTimeStamp: const IntType()
394+ // .mapFromDatabaseResponse(data['${effectivePrefix}max_time_stamp'])!,
395+ // syncId: const StringType().mapFromDatabaseResponse(
396+ // data['${effectivePrefix}synchronization_id'])!,
397+ // );
398+ // }
399+
400+ // @override
401+ // _NetCoreSyncKnowledgesTable createAlias(String alias) {
402+ // return _NetCoreSyncKnowledgesTable(_db, alias);
403+ // }
404+ // }
0 commit comments