Array Mapper (Unit tests) [x] map() succeeds Configuration (Unit tests) [x] id default succeeds [x] id change succeeds [x] autoId default succeeds [x] idStringLength default succeeds [x] dbConn() fails when no DSN specified Count (PostgreSQL integration) [x] all() succeeds [x] byFields() succeeds for a numeric range [x] byFields() succeeds for a non-numeric range [x] byContains() succeeds when documents match [x] byContains() succeeds when no documents match [x] byJsonPath() succeeds when documents match [x] byJsonPath() succeeds when no documents match Count (SQLite integration) [x] all() succeeds [x] byFields() succeeds for a numeric range [x] byFields() succeeds for a non-numeric range [x] byContains() fails [x] byJsonPath() fails Count Mapper (Unit tests) [x] map() succeeds Count Queries (Unit tests) [x] all() succeeds [x] byFields() succeeds [x] byContains() succeeds for PostgreSQL [x] byContains() fails for non PostgreSQL [x] byJsonPath() succeeds for PostgreSQL [x] byJsonPath() fails for non PostgreSQL Custom (PostgreSQL integration) [x] runQuery() succeeds with a valid query [x] runQuery() fails with an invalid query [x] list() succeeds when data is found [x] list() succeeds when no data is found [x] array() succeeds when data is found [x] array() succeeds when no data is found [x] single() succeeds when a row is found [x] single() succeeds when a row is not found [x] nonQuery() succeeds when operating on data [x] nonQuery() succeeds when no data matches WHERE clause [x] scalar() succeeds Custom (SQLite integration) [x] runQuery() succeeds with a valid query [x] runQuery() fails with an invalid query [x] list() succeeds when data is found [x] list() succeeds when no data is found [x] array() succeeds when data is found [x] array() succeeds when no data is found [x] single() succeeds when a row is found [x] single() succeeds when a row is not found [x] nonQuery() succeeds when operating on data [x] nonQuery() succeeds when no data matches WHERE clause [x] scalar() succeeds Definition (PostgreSQL integration) [x] ensureTable() succeeds [x] ensureFieldIndex() succeeds [x] ensureDocumentIndex() succeeds for Full [x] ensureDocumentIndex() succeeds for Optimized Definition (SQLite integration) [x] ensureTable() succeeds [x] ensureFieldIndex() succeeds [x] ensureDocumentIndex() fails Definition Queries (Unit tests) [x] ensureTable() succeeds for PosgtreSQL [x] ensureTable() succeeds for SQLite [x] ensureTable() fails when mode not set [x] ensureIndexOn() succeeds without schema single ascending field [x] ensureIndexOn() succeeds with schema multiple fields [x] ensureKey() succeeds [x] ensureDocumentIndexOn() succeeds for schema and Full [x] ensureDocumentIndexOn() succeeds for no schema and Optimized [x] ensureDocumentIndexOn() fails for non PostgreSQL Delete (PostgreSQL integration) [x] byId() succeeds when a document is deleted [x] byId() succeeds when a document is not deleted [x] byFields() succeeds when documents are deleted [x] byFields() succeeds when documents are not deleted [x] byContains() succeeds when documents are deleted [x] byContains() succeeds when documents are not deleted [x] byJsonPath() succeeds when documents are deleted [x] byJsonPath() succeeds when documents are not deleted Delete (SQLite integration) [x] byId() succeeds when a document is deleted [x] byId() succeeds when a document is not deleted [x] byFields() succeeds when documents are deleted [x] byFields() succeeds when documents are not deleted [x] byContains() fails [x] byJsonPath() fails Delete Queries (Unit tests) [x] byId() succeeds [x] byFields() succeeds [x] byContains() succeeds for PostgreSQL [x] byContains() fails for non PostgreSQL [x] byJsonPath() succeeds for PostgreSQL [x] byJsonPath() fails for non PostgreSQL Document (PostgreSQL integration) [x] insert() succeeds for array no auto ID [x] insert() succeeds for array with auto number ID not provided [x] insert() succeeds for array with auto number ID with ID provided [x] insert() succeeds for array with auto UUID ID not provided [x] insert() succeeds for array with auto UUID ID with ID provided [x] insert() succeeds for array with auto string ID not provided [x] insert() succeeds for array with auto string ID with ID provided [x] insert() succeeds for object no auto ID [x] insert() succeeds for object with auto number ID not provided [x] insert() succeeds for object with auto number ID with ID provided [x] insert() succeeds for object with auto UUID ID not provided [x] insert() succeeds for object with auto UUID ID with ID provided [x] insert() succeeds for object with auto string ID not provided [x] insert() succeeds for object with auto string ID with ID provided [x] insert() fails for duplicate key [x] save() succeeds when a document is inserted [x] save() succeeds when a document is updated [x] update() succeeds when replacing a document [x] update() succeeds when no document is replaced Document (SQLite integration) [x] insert() succeeds for array no auto ID [x] insert() succeeds for array with auto number ID not provided [x] insert() succeeds for array with auto number ID with ID provided [x] insert() succeeds for array with auto UUID ID not provided [x] insert() succeeds for array with auto UUID ID with ID provided [x] insert() succeeds for array with auto string ID not provided [x] insert() succeeds for array with auto string ID with ID provided [x] insert() succeeds for object no auto ID [x] insert() succeeds for object with auto number ID not provided [x] insert() succeeds for object with auto number ID with ID provided [x] insert() succeeds for object with auto UUID ID not provided [x] insert() succeeds for object with auto UUID ID with ID provided [x] insert() succeeds for object with auto string ID not provided [x] insert() succeeds for object with auto string ID with ID provided [x] insert() fails for duplicate key [x] save() succeeds when a document is inserted [x] save() succeeds when a document is updated [x] update() succeeds when replacing a document [x] update() succeeds when no document is replaced Document Exception (Unit tests) [x] Constructor succeeds with code and prior exception [x] Constructor succeeds without code and prior exception [x] toString() succeeds without code [x] toString() succeeds with code Document Mapper (Unit tests) [x] Constructor succeeds with default field [x] Constructor succeeds with specified field [x] map() succeeds with valid JSON [x] map() succeeds with valid JSON for Pjson class [x] map() fails with invalid JSON [x] map() fails with invalid JSON for Pjson class DocumentList (PostgreSQL integration) [x] create() succeeds [x] items() succeeds [x] items() fails when already consumed [x] hasItems() succeeds with empty results [x] hasItems() succeeds with non-empty results [x] map() succeeds [x] iter() succeeds [x] mapToArray() succeeds DocumentList (SQLite integration) [x] create() succeeds [x] items() succeeds [x] items() fails when already consumed [x] hasItems() succeeds with empty results [x] hasItems() succeeds with non-empty results [x] map() succeeds [x] iter() succeeds [x] mapToArray() succeeds Exists (PostgreSQL integration) [x] byId() succeeds when a document exists [x] byId() succeeds when a document does not exist [x] byFields() succeeds when documents exist [x] byFields() succeeds when no matching documents exist [x] byContains() succeeds when documents exist [x] byContains() succeeds when no matching documents exist [x] byJsonPath() succeeds when documents exist [x] byJsonPath() succeeds when no matching documents exist Exists (SQLite integration) [x] byId() succeeds when a document exists [x] byId() succeeds when a document does not exist [x] byFields() succeeds when documents exist [x] byFields() succeeds when no matching documents exist [x] byContains() fails [x] byJsonPath() fails Exists Mapper (Unit tests) [x] map() succeeds for PostgreSQL [x] map() succeeds for SQLite [x] map() fails when mode not set Exists Queries (Unit tests) [x] query() succeeds [x] byId() succeeds [x] byFields() succeeds [x] byContains() succeeds for PostgreSQL [x] byContains() fails for non PostgreSQL [x] byJsonPath() succeeds for PostgreSQL [x] byJsonPath() fails for non PostgreSQL Field (Unit tests) [x] appendParameter() succeeds for exists [x] appendParameter() succeeds for notExists [x] appendParameter() succeeds for between [x] appendParameter() succeeds for in [x] appendParameter() succeeds for inArray for PostgreSQL [x] appendParameter() succeeds for inArray for SQLite [x] appendParameter() succeeds for others [x] path() succeeds for simple SQL path for PostgreSQL [x] path() succeeds for simple SQL path for SQLite [x] path() succeeds for nested SQL path for PostgreSQL [x] path() succeeds for nested SQL path for SQLite [x] path() succeeds for simple JSON path for PostgreSQL [x] path() succeeds for simple JSON path for SQLite [x] path() succeeds for nested JSON path for PostgreSQL [x] path() succeeds for nested JSON path for SQLite [x] toWhere() succeeds for exists without qualifier for PostgreSQL [x] toWhere() succeeds for exists without qualifier for SQLite [x] toWhere() succeeds for notExists without qualifier for PostgreSQL [x] toWhere() succeeds for notExists without qualifier for SQLite [x] toWhere() succeeds for between without qualifier for SQLite [x] toWhere() succeeds for between without qualifier for PostgreSQL with numeric range [x] toWhere() succeeds for between without qualifier for PostgreSQL with non-numeric range [x] toWhere() succeeds for between with qualifier for SQLite [x] toWhere() succeeds for between with qualifier for PostgreSQL with numeric range [x] toWhere() succeeds for between with qualifier for PostgreSQL with non-numeric range [x] toWhere() succeeds for in for PostgreSQL with non-numeric values [x] toWhere() succeeds for in for PostgreSQL with numeric values [x] toWhere() succeeds for in for SQLite [x] toWhere() succeeds for inArray for PostgreSQL [x] toWhere() succeeds for inArray for SQLite [x] toWhere() succeeds for others without qualifier for PostgreSQL [x] toWhere() succeeds for others without qualifier for SQLite [x] toWhere() succeeds with qualifier no parameter for PostgreSQL [x] toWhere() succeeds with qualifier no parameter for SQLite [x] toWhere() succeeds with qualifier and parameter for PostgreSQL [x] toWhere() succeeds with qualifier and parameter for SQLite [x] equal() succeeds without parameter [x] equal() succeeds with parameter [x] greater() succeeds without parameter [x] greater() succeeds with parameter [x] greaterOrEqual() succeeds without parameter [x] greaterOrEqual() succeeds with parameter [x] less() succeeds without parameter [x] less() succeeds with parameter [x] lessOrEqual() succeeds without parameter [x] lessOrEqual() succeeds with parameter [x] notEqual() succeeds without parameter [x] notEqual() succeeds with parameter [x] between() succeeds without parameter [x] between() succeeds with parameter [x] in() succeeds without parameter [x] in() succeeds with parameter [x] inArray() succeeds without parameter [x] inArray() succeeds with parameter [x] exists() succeeds [x] notExists() succeeds [x] named() succeeds Field Match (Unit tests) [x] toSQL() succeeds for All [x] toSQL() succeeds for Any Find (PostgreSQL integration) [x] all() succeeds when there is data [x] all() succeeds when ordering data ascending [x] all() succeeds when ordering data descending [x] all() succeeds when ordering data numerically [x] all() succeeds when there is no data [x] byId() succeeds when a document is found [x] byId() succeeds when a document is found with numeric ID [x] byId() succeeds when a document is not found [x] byFields() succeeds when documents are found [x] byFields() succeeds when documents are found and ordered [x] byFields() succeeds when documents are found using IN with numeric field [x] byFields() succeeds when no documents are found [x] byFields() succeeds for inArray when matching documents exist [x] byFields() succeeds for inArray when no matching documents exist [x] byContains() succeeds when documents are found [x] byContains() succeeds when documents are found and ordered [x] byContains() succeeds when no documents are found [x] byJsonPath() succeeds when documents are found [x] byJsonPath() succeeds when documents are found and ordered [x] byJsonPath() succeeds when no documents are found [x] firstByFields() succeeds when a document is found [x] firstByFields() succeeds when multiple documents are found [x] firstByFields() succeeds when multiple ordered documents are found [x] firstByFields() succeeds when a document is not found [x] firstByContains() succeeds when a document is found [x] firstByContains() succeeds when multiple documents are found [x] firstByContains() succeeds when multiple ordered documents are found [x] firstByContains() succeeds when a document is not found [x] firstByJsonPath() succeeds when a document is found [x] firstByJsonPath() succeeds when multiple documents are found [x] firstByJsonPath() succeeds when multiple ordered documents are found [x] firstByJsonPath() succeeds when a document is not found Find (SQLite integration) [x] all() succeeds when there is data [x] all() succeeds when ordering data ascending [x] all() succeeds when ordering data descending [x] all() succeeds when ordering data numerically [x] all() succeeds when there is no data [x] byId() succeeds when a document is found [x] byId() succeeds when a document is found with numeric ID [x] byId() succeeds when a document is not found [x] byFields() succeeds when documents are found [x] byFields() succeeds when documents are found and ordered [x] byFields() succeeds when documents are found using IN with numeric field [x] byFields() succeeds when no documents are found [x] byFields() succeeds for inArray when matching documents exist [x] byFields() succeeds for inArray when no matching documents exist [x] byContains() fails [x] byJsonPath() fails [x] firstByFields() succeeds when a document is found [x] firstByFields() succeeds when multiple documents are found [x] firstByFields() succeeds when multiple ordered documents are found [x] firstByFields() succeeds when a document is not found [x] firstByContains() fails [x] firstByJsonPath() fails Find Queries (Unit tests) [x] byId() succeeds [x] byFields() succeeds [x] byContains() succeeds for PostgreSQL [x] byContains() fails for non PostgreSQL [x] byJsonPath() succeeds for PostgreSQL [x] byJsonPath() fails for non PostgreSQL Mode (Unit tests) [x] deriveFromDSN() succeeds for PostgreSQL [x] deriveFromDSN() succeeds for SQLite [x] deriveFromDSN() fails for MySQL Op (Unit tests) [x] toSQL() succeeds for Equal [x] toSQL() succeeds for Greater [x] toSQL() succeeds for GreaterOrEqual [x] toSQL() succeeds for Less [x] toSQL() succeeds for LessOrEqual [x] toSQL() succeeds for NotEqual [x] toSQL() succeeds for Between [x] toSQL() succeeds for In [x] toSQL() succeeds for InArray [x] toSQL() succeeds for Exists [x] toSQL() succeeds for NotExists Parameters (Unit tests) [x] id() succeeds with string [x] id() succeeds with non string [x] json() succeeds for array [x] json() succeeds for array with empty array parameter [x] json() succeeds for 1D array with empty array parameter [x] json() succeeds for stdClass [x] json() succeeds for Pjson class [x] json() succeeds for array of Pjson class [x] nameFields() succeeds [x] addFields() succeeds [x] fieldNames() succeeds for PostgreSQL [x] fieldNames() succeeds for SQLite [x] fieldNames() fails when mode not set Patch (PostgreSQL integration) [x] byId() succeeds when a document is updated [x] byId() succeeds when no document is updated [x] byFields() succeeds when a document is updated [x] byFields() succeeds when no document is updated [x] byContains() succeeds when documents are updated [x] byContains() succeeds when no documents are updated [x] byJsonPath() succeeds when documents are updated [x] byJsonPath() succeeds when documents are not updated Patch (SQLite integration) [x] byId() succeeds when a document is updated [x] byId() succeeds when no document is updated [x] byFields() succeeds when a document is updated [x] byFields() succeeds when no document is updated [x] byContains() fails [x] byJsonPath() fails Patch Queries (Unit tests) [x] byId() succeeds for PostgreSQL [x] byId() succeeds for SQLite [x] byId() fails when mode not set [x] byFields() succeeds for PostgreSQL [x] byFields() succeeds for SQLite [x] byFields() fails when mode not set [x] byContains() succeeds for PostgreSQL [x] byContains() fails for non PostgreSQL [x] byJsonPath() succeeds for PostgreSQL [x] byJsonPath() fails for non PostgreSQL Query (Unit tests) [x] selectFromTable() succeeds [x] whereByFields() succeeds for single field [x] whereByFields() succeeds for multiple fields All [x] whereByFields() succeeds for multiple fields Any [x] whereById() succeeds with default parameter [x] whereById() succeeds with specific parameter [x] whereDataContains() succeeds with default parameter [x] whereDataContains() succeeds with specific parameter [x] whereDataContains() fails if not PostgreSQL [x] whereJsonPathMatches() succeeds with default parameter [x] whereJsonPathMatches() succeeds with specified parameter [x] whereJsonPathMatches() fails if not PostgreSQL [x] insert() succeeds with no auto-ID for PostgreSQL [x] insert() succeeds with no auto-ID for SQLite [x] insert() succeeds with auto numeric ID for PostgreSQL [x] insert() succeeds with auto numeric ID for SQLite [x] insert() succeeds with auto UUID for PostgreSQL [x] insert() succeeds with auto UUID for SQLite [x] insert() succeeds with auto random string for PostgreSQL [x] insert() succeeds with auto random string for SQLite [x] insert() fails when mode not set [x] save() succeeds [x] update() succeeds [x] orderBy() succeeds with no fields for PostgreSQL [x] orderBy() succeeds with no fields for SQLite [x] orderBy() succeeds with one field and no direction for PostgreSQL [x] orderBy() succeeds with one field and no direction for SQLite [x] orderBy() succeeds with multiple fields and direction for PostgreSQL [x] orderBy() succeeds with multiple fields and direction for SQLite [x] orderBy() succeeds with numeric field for PostgreSQL [x] orderBy() succeeds with numeric field for SQLite [x] orderBy() succeeds with case-insensitive ordering for PostgreSQL [x] orderBy() succeeds with case-insensitive ordering for SQLite Remove Fields (PostgreSQL integration) [x] byId() succeeds when fields are removed [x] byId() succeeds when a field is not removed [x] byId() succeeds when no document is matched [x] byFields() succeeds when a field is removed [x] byFields() succeeds when a field is not removed [x] byFields() succeeds when no document is matched [x] byContains() succeeds when a field is removed [x] byContains() succeeds when a field is not removed [x] byContains() succeeds when no document is matched [x] byJsonPath() succeeds when a field is removed [x] byJsonPath() succeeds when a field is not removed [x] byJsonPath() succeeds when no document is matched Remove Fields (SQLite integration) [x] byId() succeeds when fields are removed [x] byId() succeeds when a field is not removed [x] byId() succeeds when no document is matched [x] byFields() succeeds when a field is removed [x] byFields() succeeds when a field is not removed [x] byFields() succeeds when no document is matched [x] byContains() fails [x] byJsonPath() fails Remove Fields Queries (Unit tests) [x] update() succeeds for PostgreSQL [x] update() succeeds for SQLite [x] update() fails when mode not set [x] byId() succeeds for PostgreSQL [x] byId() succeeds for SQLite [x] byId() fails when mode not set [x] byFields() succeeds for PostgreSQL [x] byFields() succeeds for SQLite [x] byFields() fails when mode not set [x] byContains() succeeds for PostgreSQL [x] byContains() fails for non PostgreSQL [x] byJsonPath() succeeds for PostgreSQL [x] byJsonPath() fails for non PostgreSQL String Mapper (Unit tests) [x] map() succeeds when field is present and string [x] map() succeeds when field is present and not string [x] map() succeeds when field is not present