Skip to content

Releases: Colossus-Services/bones_api

v1.9.31

10 Jun 18:40

Choose a tag to compare

1.9.31

  • Bug fixes:

    • ConditionSQLEncoder.valueToParameterValue: fixed encoding of a List of values containing ConditionParameters; each element is now resolved individually instead of passing the whole list to every element.
    • ConditionEncoder.resolveValueToType: fixed resolution of a single-element Iterable to a primitive type (was a no-op comparison instead of an assignment, leaving the value as a List).
    • MapGetterExtension.matchKeyIgnoreCase: fixed case-insensitive key matching that always returned null (empty loop body); now returns the matching key. Also fixes setMultiValue(..., ignoreCase: true).
    • Time: millisecond/microsecond range validation now correctly rejects 1000 (valid range is 0..999).
    • Time._bytesInStringFormat: fixed the second-byte digit check that was effectively disabled (length < 2 instead of length >= 2).
    • APISession.isExpired: now honors the provided now argument instead of always using DateTime.now().
    • APIServerResponseCache cached entry: replaceFileStat no longer compares a variable to itself (identical(myFileStat, myFileStat)), so the file stat is correctly replaced.
    • WeakList.set: now increments the internal modification counter, consistent with the other mutating methods.
  • Tests:

    • Added tests covering the bug fixes above (Time range/string parsing, matchKeyIgnoreCase/getIgnoreCase/setMultiValue, APISession.isExpired, and ConditionSQLEncoder/ConditionEncoder value resolution).

v1.9.30

30 Apr 22:24

Choose a tag to compare

v1.9.30

  • APIRootStarter:

    • start:
      • Added logging of severe errors when apiRoot.ensureInitialized() returns a failure with an error.
  • Project template:

    • update_project_template.sh:
      • Updated project_template prepare command to exclude IDE module files matching ^\w+\.iml$ from the template archive.
  • Dependencies:

    • Updated build_runner to ^2.15.0.
    • Updated test to ^1.31.1.
    • Updated vm_service to ^15.2.0.

v1.9.29

16 Apr 04:42
00b258b

Choose a tag to compare

  • ConditionID:

    • Added method resolveIDValue to resolve the ID value from parameters or ConditionParameter.
  • DBEntityRepository:

    • Updated selectIDsBy and _selectByID to use ConditionID.resolveIDValue for ID resolution.
    • select:
      • Added optimization for KeyConditionEQ matcher with a single key matching the entity ID field.
      • When matched, uses _selectByID to fetch the entity by ID and returns a single-element list or empty list accordingly.
  • DBObjectDirectoryAdapter:

    • Updated _doCountImpl and _doDeleteImpl to use ConditionID.resolveIDValue for ID resolution.
    • Updated public methods to pass combined parameters (parameters ?? namedParameters) to internal implementations.
  • DBObjectGCSAdapter:

    • Updated _doCountImpl and _doDeleteImpl to use ConditionID.resolveIDValue for ID resolution.
    • Updated public methods to pass combined parameters (parameters ?? namedParameters) to internal implementations.
  • DBObjectMemoryAdapter:

    • Updated _doCountImpl and _doDeleteImpl to use ConditionID.resolveIDValue for ID resolution.
    • Updated public methods to pass combined parameters (parameters ?? namedParameters) to internal implementations.
  • Dependency updates:

    • vm_service: ^15.0.2 → ^15.1.0

v1.9.28

08 Apr 21:21

Choose a tag to compare

  • SQLGenerator:

    • Fixed referenceTable and referenceColumn assignment in unique constraint SQL entries to allow nullable references.
    • Updated unique and enum constraint names in generateAddUniqueConstraintAlterTableSQL and generateAddEnumConstraintAlterTableSQL to use normalized column names with double underscores for consistency.
  • Dependency updates:

    • async_extension: ^1.2.22
    • reflection_factory: ^2.7.5
    • swiss_knife: ^3.3.14
    • meta: ^1.18.2
    • hotreloader: ^4.4.0
    • googleapis_auth: ^2.3.0
    • build_runner: ^2.13.1
    • test: ^1.31.0

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.