Skip to content

Releases: Colossus-Services/bones_api

v1.9.27

18 Feb 02:24

Choose a tag to compare

  • Added bones_api_utils_fast_checksum.dart:

    • Provides functions getAdler32Uint8List, getAdler32Hex, getCrc32Uint8List, and getCrc32Hex for Adler-32 and CRC-32 checksums as byte arrays and hex strings.
    • Implements internal helpers for big-endian byte conversion and hex encoding.
    • Exports getAdler32 and getCrc32 from archive package for checksum calculation.
  • WeakEtag class (bones_api_base.dart):

    • Updated WeakEtag.adler32 and WeakEtag.crc32 factories to use getAdler32Hex and getCrc32Hex from bones_api_utils_fast_checksum.dart instead of deprecated Adler32 and Crc32 classes.
  • bones_api.dart:

    • Exported new bones_api_utils_fast_checksum.dart utility.
  • Dependencies:

    • Updated async_extension from ^1.2.20 to ^1.2.21.
    • Updated swiss_knife from ^3.3.3 to ^3.3.5.
    • Updated archive from ^4.0.7 to ^4.0.9.
    • Updated build_runner from ^2.10.5 to ^2.11.1.
    • docker_commander: ^2.1.8

v1.9.26

03 Feb 03:44
7672b53

Choose a tag to compare

  • Initializable mixin:
    • ensureInitialized: added onError handler to then call to route errors to _onInitializationError.
    • executeInitializedCallback:
      • Added onError handler to then call on async initialization result to throw InitializationError with stack trace.
    • _FutureExtension:
      • toCompleter: added onError handler to then to complete completer with error and stack trace if not completed.

v1.9.25

30 Jan 04:34
5b7c470

Choose a tag to compare

  • TableFieldReference:

    • Added nullable field indexName to represent the name of the index if one exists.
  • Added new class TableRelationshipReferenceEntityTyped extending TableRelationshipReference:

    • Adds sourceFieldEntityType and targetFieldEntityType fields of type TypeInfo.
    • Provides copyWithEntityTypes method to create typed copies.
  • TableRelationshipReference:

    • Added nullable fields sourceRelationshipFieldIndex and targetRelationshipFieldIndex.
    • Added copyWithEntityTypes method returning TableRelationshipReferenceEntityTyped.
  • EntityHandler:

    • Added getFieldsListEntityTypes method to return a map of fields that are list entities or references with their TypeInfo.
  • SQLDialect:

    • Added foreignKeyCreatesImplicitIndex boolean flag with default true.
    • Added field createIndexIfNotExists to indicate support for IF NOT EXISTS in CREATE INDEX (default true).
  • CreateIndexSQL:

    • Updated buildSQL method to conditionally include IF NOT EXISTS only if dialect supports it.
  • DBPostgreSQLAdapter:

    • Added foreignKeyCreatesImplicitIndex flag to PostgreSQL dialect set to false.
    • Updated _findAllTableFieldsReferences query to include foreign key index name (fk_index_name) by joining with pg_index and pg_class.
    • Populated indexName in TableFieldReference instances from query result.
    • Updated relationship references to include sourceRelationshipFieldIndex and targetRelationshipFieldIndex from indexName.
  • DBMySQLAdapter:

    • Set createIndexIfNotExists to false in MySQL dialect capabilities.
  • DBSQLAdapter:

    • parseConfigDBGenerateTablesAndCheckTables: changed return type from List<bool> to a record with named fields (generateTables, checkTables).
    • extractTableSQLs: updated regex to also match CREATE INDEX statements in addition to CREATE and ALTER TABLE.
    • _populateTablesFromSQLsImpl: fixed error handling for CREATE INDEX statements when the SQL dialect does not support IF NOT EXISTS.
      • Now logs a warning and ignores the error instead of throwing.
    • Added detection of missing foreign key indexes when dialect does not create implicit indexes.
    • Added detection of missing relationship reference indexes for collection reference fields.
    • Updated error reporting and logging to include missing reference indexes and relationship reference indexes.
    • Updated _checkDBTableSchemeReferenceField to return TableRelationshipReferenceEntityTyped with entity types.
    • Added generation of missing reference indexes and missing relationship reference indexes SQL statements.
    • Updated _DBTableCheck class:
      • Added fields missingReferenceIndexes and missingRelationshipReferenceIndexes.
      • Added methods to generate missing reference indexes and relationship reference indexes SQL.
    • Added _DBRelationshipTableColumn subclass of _DBTableColumn to represent relationship table columns with relationship table name.
    • Updated SQL generation to create indexes for foreign keys if dialect does not create implicit indexes:
      • Added index creation after foreign key constraints in generateAddColumnAlterTableSQL.
      • Added index creation for relationship table foreign keys in relationship table creation SQL.
  • Dependency updates:

    • async_extension: ^1.2.19 → ^1.2.20
    • meta: ^1.18.0 → ^1.18.1

v1.9.24

22 Jan 21:20

Choose a tag to compare

  • GZipSink:

    • Added override for addSlice to handle partial chunk addition and update _inputLength accordingly.
    • Optimized addSlice to call _gzipSink.close() when isLast is true and full chunk is added.
  • BytesSink:

    • Updated addSlice to use new addPart method for partial chunk addition.
  • BytesBuffer:

    • Added addPart method to add a slice of bytes from a given offset and length, resizing buffer if needed.
    • Refactored add method to delegate to addPart.
    • Improved buffer range setting to support offset and length parameters in addPart.
  • async_extension: ^1.2.18 -> ^1.2.19

v1.9.23

20 Jan 08:47

Choose a tag to compare

  • DBPostgreSQLAdapter:
    • mapDataTypeToDartType: added support for PostgreSQL types smallint and smallserial mapping to int.

v1.9.22

20 Jan 07:12

Choose a tag to compare

  • Initializable mixin:

    • Added calls to _forceLogFlushMessages() before throwing InitializationError in:
      • _checkDependency
      • _setInitializedDependenciesCompleters
      • _onInitializationError
      • _checkAllDependenciesOk
      • _finalizeInitialization
      • checkInitialized
      • executeInitialized
  • Logging:

    • Added _forceLogFlushMessages() function to call logging.Logger.root.forceFlushMessages().
    • Logger extension:
      • Added forceFlushMessages() method to invoke LoggerHandler.forceFlushMessages().
    • LoggerHandler abstract class:
      • Added forceFlushMessages() method.
    • LoggerHandlerGeneric implementation:
      • Implemented forceFlushMessages() returning false.
    • LoggerHandlerIO implementation:
      • Implemented forceFlushMessages() to flush the print message queue immediately if not empty.

v1.9.21

17 Jan 05:57
701a3bb

Choose a tag to compare

  • EntityHandler:

    • Updated all Map.unmodifiable usages to explicitly specify type arguments, e.g. Map<String, TypeInfo>.unmodifiable.
    • Updated methods including fieldsWithEntityReference, fieldsWithEntityReferenceList, fieldsEntityAnnotations, fieldsWithType, getFieldsTypes, getFieldsEnumTypes, getFieldsEntityTypes, and constructors to use typed unmodifiable maps.
    • Improved type safety in map constructions by adding explicit generic parameters.
  • Dependency updates:

    • meta: ^1.18.0

v1.9.20

15 Jan 01:38
5824c3d

Choose a tag to compare

  • ConditionSQLEncoder:

    • keyToSQL: added check to throw ConditionEncodingError if keys is empty.
    • Refactored keyFieldReferenceToSQL to recursively resolve multi-level key references by walking keys and resolving intermediate tables and relationships.
    • Added helper methods _resolveReferenceField and _resolveFinalField to modularize reference resolution logic.
  • DBSQLAdapter:

    • Introduced _JoinEntry typedef to represent SQL JOIN fragments with explicit alias dependencies (defs and refs).
    • Added local extension methods on List<_JoinEntry> to perform dependency-aware sorting of JOINs ensuring referenced aliases are resolved before use.
    • Refactored JOIN construction logic in SQL query building to:
      • Collect JOINs as _JoinEntry with defined and referenced aliases.
      • Sort JOINs by alias dependencies before concatenation.
      • Log a warning if not all JOIN references could be resolved.
    • This improves correctness and ordering of JOIN clauses in generated SQL.
  • Dependencies:

    • Updated async_extension from ^1.2.17 to ^1.2.18.
    • Updated build_runner from ^2.10.4 to ^2.10.5.

v1.9.19

09 Jan 07:33

Choose a tag to compare

  • Dependency updates:
    • Updated reflection_factory dependency from ^2.7.2 to ^2.7.3.

v1.9.18

09 Jan 06:21
57d7c87

Choose a tag to compare

  • DBAdapter:

    • Improved error messages in instantiation methods to include a list of instantiator function keys.
  • Dependencies:

    • Updated async_extension from ^1.2.15 to ^1.2.17.
    • Updated test from ^1.28.0 to ^1.29.0.