From d3abcfe211542f40bce8679ef647fecf37f5ecea Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Sat, 4 Nov 2023 19:05:23 +0000 Subject: [PATCH] Applied new .gitignore --- .../models/generated/objectbox.g.dart | 230 ------------------ 1 file changed, 230 deletions(-) delete mode 100644 lib/src/backend/impls/objectbox/models/generated/objectbox.g.dart diff --git a/lib/src/backend/impls/objectbox/models/generated/objectbox.g.dart b/lib/src/backend/impls/objectbox/models/generated/objectbox.g.dart deleted file mode 100644 index 5d8d4c13..00000000 --- a/lib/src/backend/impls/objectbox/models/generated/objectbox.g.dart +++ /dev/null @@ -1,230 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND -// This code was generated by ObjectBox. To update it run the generator again: -// With a Flutter package, run `flutter pub run build_runner build`. -// With a Dart package, run `dart run build_runner build`. -// See also https://docs.objectbox.io/getting-started#generate-objectbox-code - -// ignore_for_file: camel_case_types, depend_on_referenced_packages -// coverage:ignore-file - -import 'dart:typed_data'; - -import 'package:flat_buffers/flat_buffers.dart' as fb; -import 'package:objectbox/internal.dart'; // generated code can access "internal" functionality -import 'package:objectbox/objectbox.dart'; -import 'package:objectbox_flutter_libs/objectbox_flutter_libs.dart'; - -import '../../../../../../src/backend/impls/objectbox/models/models.dart'; - -export 'package:objectbox/objectbox.dart'; // so that callers only have to import this file - -final _entities = [ - ModelEntity( - id: const IdUid(3, 3564285316728157354), - name: 'ObjectBoxStore', - lastPropertyId: const IdUid(2, 5839091915824466165), - flags: 0, - properties: [ - ModelProperty( - id: const IdUid(1, 5129628855357846983), - name: 'id', - type: 6, - flags: 1), - ModelProperty( - id: const IdUid(2, 5839091915824466165), - name: 'name', - type: 9, - flags: 2080, - indexId: const IdUid(4, 4070553972642232057)) - ], - relations: [], - backlinks: [ - ModelBacklink(name: 'tiles', srcEntity: 'ObjectBoxTile', srcField: '') - ]), - ModelEntity( - id: const IdUid(4, 1221776040269555016), - name: 'ObjectBoxTile', - lastPropertyId: const IdUid(4, 325740197791906264), - flags: 0, - properties: [ - ModelProperty( - id: const IdUid(1, 6708383205929458485), - name: 'id', - type: 6, - flags: 1), - ModelProperty( - id: const IdUid(2, 7632311904162794182), - name: 'url', - type: 9, - flags: 34848, - indexId: const IdUid(5, 6190682863606461840)), - ModelProperty( - id: const IdUid(3, 4021600588433010488), - name: 'lastModified', - type: 10, - flags: 8, - indexId: const IdUid(6, 7105980852148339018)), - ModelProperty( - id: const IdUid(4, 325740197791906264), - name: 'bytes', - type: 23, - flags: 0) - ], - relations: [ - ModelRelation( - id: const IdUid(2, 7253865609688140673), - name: 'stores', - targetId: const IdUid(3, 3564285316728157354)) - ], - backlinks: []) -]; - -/// Shortcut for [Store.new] that passes [getObjectBoxModel] and for Flutter -/// apps by default a [directory] using `defaultStoreDirectory()` from the -/// ObjectBox Flutter library. -/// -/// Note: for desktop apps it is recommended to specify a unique [directory]. -/// -/// See [Store.new] for an explanation of all parameters. -Future openStore( - {String? directory, - int? maxDBSizeInKB, - int? fileMode, - int? maxReaders, - bool queriesCaseSensitiveDefault = true, - String? macosApplicationGroup}) async => - Store(getObjectBoxModel(), - directory: directory ?? (await defaultStoreDirectory()).path, - maxDBSizeInKB: maxDBSizeInKB, - fileMode: fileMode, - maxReaders: maxReaders, - queriesCaseSensitiveDefault: queriesCaseSensitiveDefault, - macosApplicationGroup: macosApplicationGroup); - -/// Returns the ObjectBox model definition for this project for use with -/// [Store.new]. -ModelDefinition getObjectBoxModel() { - final model = ModelInfo( - entities: _entities, - lastEntityId: const IdUid(4, 1221776040269555016), - lastIndexId: const IdUid(6, 7105980852148339018), - lastRelationId: const IdUid(2, 7253865609688140673), - lastSequenceId: const IdUid(0, 0), - retiredEntityUids: const [6351682704282101940, 3030016702019813306], - retiredIndexUids: const [], - retiredPropertyUids: const [ - 4615710800892160360, - 7634309479420249012, - 1360422513191232937, - 2679707907762759593, - 4242260097954056817, - 5886094580441791807 - ], - retiredRelationUids: const [], - modelVersion: 5, - modelVersionParserMinimum: 5, - version: 1); - - final bindings = { - ObjectBoxStore: EntityDefinition( - model: _entities[0], - toOneRelations: (ObjectBoxStore object) => [], - toManyRelations: (ObjectBoxStore object) => - {RelInfo.toManyBacklink(2, object.id): object.tiles}, - getId: (ObjectBoxStore object) => object.id, - setId: (ObjectBoxStore object, int id) { - object.id = id; - }, - objectToFB: (ObjectBoxStore object, fb.Builder fbb) { - final nameOffset = fbb.writeString(object.name); - fbb.startTable(3); - fbb.addInt64(0, object.id); - fbb.addOffset(1, nameOffset); - fbb.finish(fbb.endTable()); - return object.id; - }, - objectFromFB: (Store store, ByteData fbData) { - final buffer = fb.BufferContext(fbData); - final rootOffset = buffer.derefObject(0); - final nameParam = const fb.StringReader(asciiOptimization: true) - .vTableGet(buffer, rootOffset, 6, ''); - final object = ObjectBoxStore(name: nameParam) - ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0); - InternalToManyAccess.setRelInfo(object.tiles, store, - RelInfo.toManyBacklink(2, object.id)); - return object; - }), - ObjectBoxTile: EntityDefinition( - model: _entities[1], - toOneRelations: (ObjectBoxTile object) => [], - toManyRelations: (ObjectBoxTile object) => - {RelInfo.toMany(2, object.id): object.stores}, - getId: (ObjectBoxTile object) => object.id, - setId: (ObjectBoxTile object, int id) { - object.id = id; - }, - objectToFB: (ObjectBoxTile object, fb.Builder fbb) { - final urlOffset = fbb.writeString(object.url); - final bytesOffset = fbb.writeListInt8(object.bytes); - fbb.startTable(5); - fbb.addInt64(0, object.id); - fbb.addOffset(1, urlOffset); - fbb.addInt64(2, object.lastModified.millisecondsSinceEpoch); - fbb.addOffset(3, bytesOffset); - fbb.finish(fbb.endTable()); - return object.id; - }, - objectFromFB: (Store store, ByteData fbData) { - final buffer = fb.BufferContext(fbData); - final rootOffset = buffer.derefObject(0); - final urlParam = const fb.StringReader(asciiOptimization: true) - .vTableGet(buffer, rootOffset, 6, ''); - final lastModifiedParam = DateTime.fromMillisecondsSinceEpoch( - const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0)); - final bytesParam = const fb.Uint8ListReader(lazy: false) - .vTableGet(buffer, rootOffset, 10, Uint8List(0)) as Uint8List; - final object = ObjectBoxTile( - url: urlParam, lastModified: lastModifiedParam, bytes: bytesParam) - ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0); - InternalToManyAccess.setRelInfo(object.stores, store, - RelInfo.toMany(2, object.id)); - return object; - }) - }; - - return ModelDefinition(model, bindings); -} - -/// [ObjectBoxStore] entity fields to define ObjectBox queries. -class ObjectBoxStore_ { - /// see [ObjectBoxStore.id] - static final id = - QueryIntegerProperty(_entities[0].properties[0]); - - /// see [ObjectBoxStore.name] - static final name = - QueryStringProperty(_entities[0].properties[1]); -} - -/// [ObjectBoxTile] entity fields to define ObjectBox queries. -class ObjectBoxTile_ { - /// see [ObjectBoxTile.id] - static final id = - QueryIntegerProperty(_entities[1].properties[0]); - - /// see [ObjectBoxTile.url] - static final url = - QueryStringProperty(_entities[1].properties[1]); - - /// see [ObjectBoxTile.lastModified] - static final lastModified = - QueryIntegerProperty(_entities[1].properties[2]); - - /// see [ObjectBoxTile.bytes] - static final bytes = - QueryByteVectorProperty(_entities[1].properties[3]); - - /// see [ObjectBoxTile.stores] - static final stores = QueryRelationToMany( - _entities[1].relations[0]); -}