Array Mapper (Unit tests) [x] Map succeeds Configuration (Unit tests) [x] ID field default succeeds [x] ID field change succeeds [x] Auto ID default succeeds [x] ID string length default succeeds [x] Db conn fails when no DSN specified Count (PostgreSQL integration) [x] All succeeds [x] By fields succeeds for a numeric range [x] By fields succeeds for a non numeric range [x] By contains succeeds when documents match [x] By contains succeeds when no documents match [x] By JSON Path succeeds when documents match [x] By JSON Path succeeds when no documents match Count (SQLite integration) [x] All succeeds [x] By fields succeeds for a numeric range [x] By fields succeeds for a non numeric range [x] By contains fails [x] By JSON Path fails Count Mapper (Unit tests) [x] Map succeeds Count Queries (Unit tests) [x] All succeeds [x] By fields succeeds [x] By contains succeeds for PostgreSQL [x] By contains fails for non PostgreSQL [x] By JSON Path succeeds for PostgreSQL [x] By JSON Path fails for non PostgreSQL Custom (PostgreSQL integration) [x] Run query succeeds with a valid query [x] Run query 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] Non query succeeds when operating on data [x] Non query succeeds when no data matches where clause [x] Scalar succeeds Custom (SQLite integration) [x] Run query succeeds with a valid query [x] Run query 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] Non query succeeds when operating on data [x] Non query succeeds when no data matches where clause [x] Scalar succeeds Definition (PostgreSQL integration) [x] Ensure table succeeds [x] Ensure field index succeeds [x] Ensure document index succeeds for full [x] Ensure document index succeeds for optimized Definition (SQLite integration) [x] Ensure table succeeds [x] Ensure field index succeeds [x] Ensure document index fails Definition Queries (Unit tests) [x] Ensure table succeeds for PosgtreSQL [x] Ensure table succeeds for SQLite [x] Ensure table fails when mode not set [x] Ensure index on succeeds without schema single ascending field [x] Ensure index on succeeds with schema multiple fields [x] Ensure key succeeds [x] Ensure document index on succeeds for schema and full [x] Ensure document index on succeeds for no schema and optimized [x] Ensure document index on fails for non PostgreSQL Delete (PostgreSQL integration) [x] By ID succeeds when a document is deleted [x] By ID succeeds when a document is not deleted [x] By fields succeeds when documents are deleted [x] By fields succeeds when documents are not deleted [x] By contains succeeds when documents are deleted [x] By contains succeeds when documents are not deleted [x] By JSON Path succeeds when documents are deleted [x] By JSON Path succeeds when documents are not deleted Delete (SQLite integration) [x] By ID succeeds when a document is deleted [x] By ID succeeds when a document is not deleted [x] By fields succeeds when documents are deleted [x] By fields succeeds when documents are not deleted [x] By contains fails [x] By JSON Path fails Delete Queries (Unit tests) [x] By ID succeeds [x] By fields succeeds [x] By contains succeeds for PostgreSQL [x] By contains fails for non PostgreSQL [x] By JSON Path succeeds for PostgreSQL [x] By JSON Path 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] To string succeeds without code [x] To string 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] Has items succeeds with empty results [x] Has items succeeds with non empty results [x] Map succeeds [x] Iter succeeds [x] Map to array succeeds DocumentList (SQLite integration) [x] Create succeeds [x] Items succeeds [x] Items fails when already consumed [x] Has items succeeds with empty results [x] Has items succeeds with non empty results [x] Map succeeds [x] Iter succeeds [x] Map to array succeeds Exists (PostgreSQL integration) [x] By ID succeeds when a document exists [x] By ID succeeds when a document does not exist [x] By fields succeeds when documents exist [x] By fields succeeds when no matching documents exist [x] By contains succeeds when documents exist [x] By contains succeeds when no matching documents exist [x] By JSON Path succeeds when documents exist [x] By JSON Path succeeds when no matching documents exist Exists (SQLite integration) [x] By ID succeeds when a document exists [x] By ID succeeds when a document does not exist [x] By fields succeeds when documents exist [x] By fields succeeds when no matching documents exist [x] By contains fails [x] By JSON Path 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] By ID succeeds [x] By fields succeeds [x] By contains succeeds for PostgreSQL [x] By contains fails for non PostgreSQL [x] By JSON Path succeeds for PostgreSQL [x] By JSON Path fails for non PostgreSQL Field (Unit tests) [x] Append parameter succeeds for EX [x] Append parameter succeeds for NEX [x] Append parameter succeeds for BT [x] Append parameter succeeds for others [x] To where succeeds for EX without qualifier for PostgreSQL [x] To where succeeds for EX without qualifier for SQLite [x] To where succeeds for NEX without qualifier for PostgreSQL [x] To where succeeds for NEX without qualifier for SQLite [x] To where succeeds for BT without qualifier for SQLite [x] To where succeeds for BT without qualifier for PostgreSQL with numeric range [x] To where succeeds for BT without qualifier for PostgreSQL with non-numeric range [x] To where succeeds for BT with qualifier for SQLite [x] To where succeeds for BT with qualifier for PostgreSQL with numeric range [x] To where succeeds for BT with qualifier for PostgreSQL with non-numeric range [x] To where succeeds for others without qualifier for PostgreSQL [x] To where succeeds for others without qualifier for SQLite [x] To where succeeds with qualifier no parameter for PostgreSQL [x] To where succeeds with qualifier no parameter for SQLite [x] To where succeeds with qualifier and parameter for PostgreSQL [x] To where succeeds with qualifier and parameter for SQLite [x] To where succeeds with sub-document for PostgreSQL [x] To where succeeds with sub-document for SQLite [x] EQ succeeds without parameter [x] EQ succeeds with parameter [x] GT succeeds without parameter [x] GT succeeds with parameter [x] GE succeeds without parameter [x] GE succeeds with parameter [x] LT succeeds without parameter [x] LT succeeds with parameter [x] LE succeeds without parameter [x] LE succeeds with parameter [x] NE succeeds without parameter [x] NE succeeds with parameter [x] BT succeeds without parameter [x] BT succeeds with parameter [x] EX succeeds [x] NEX succeeds Field Match (Unit tests) [x] To SQL succeeds for all [x] To SQL succeeds for any Find (PostgreSQL integration) [x] All succeeds when there is data [x] All succeeds when there is no data [x] By ID succeeds when a document is found [x] By ID succeeds when a document is found with numeric ID [x] By ID succeeds when a document is not found [x] By fields succeeds when documents are found [x] By fields succeeds when no documents are found [x] By contains succeeds when documents are found [x] By contains succeeds when no documents are found [x] By JSON Path succeeds when documents are found [x] By JSON Path succeeds when no documents are found [x] First by fields succeeds when a document is found [x] First by fields succeeds when multiple documents are found [x] First by fields succeeds when a document is not found [x] First by contains succeeds when a document is found [x] First by contains succeeds when multiple documents are found [x] First by contains succeeds when a document is not found [x] First by JSON Path succeeds when a document is found [x] First by JSON Path succeeds when multiple documents are found [x] First by JSON Path succeeds when a document is not found Find (SQLite integration) [x] All succeeds when there is data [x] All succeeds when there is no data [x] By ID succeeds when a document is found [x] By ID succeeds when a document is found with numeric ID [x] By ID succeeds when a document is not found [x] By fields succeeds when documents are found [x] By fields succeeds when no documents are found [x] By contains fails [x] By JSON Path fails [x] First by fields succeeds when a document is found [x] First by fields succeeds when multiple documents are found [x] First by fields succeeds when a document is not found [x] First by contains fails [x] First by JSON Path fails Find Queries (Unit tests) [x] By ID succeeds [x] By fields succeeds [x] By contains succeeds for PostgreSQL [x] By contains fails for non PostgreSQL [x] By JSON Path succeeds for PostgreSQL [x] By JSON Path fails for non PostgreSQL Mode (Unit tests) [x] Derive from DSN succeeds for PostgreSQL [x] Derive from DSN succeeds for SQLite [x] Derive from DSN fails for MySQL Op (Unit tests) [x] To SQL succeeds for EQ [x] To SQL succeeds for GT [x] To SQL succeeds for GE [x] To SQL succeeds for LT [x] To SQL succeeds for LE [x] To SQL succeeds for NE [x] To SQL succeeds for BT [x] To SQL succeeds for EX [x] To SQL succeeds for NEX 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] Name fields succeeds [x] Add fields succeeds [x] Field names succeeds for PostgreSQL [x] Field names succeeds for SQLite [x] Field names fails when mode not set Patch (PostgreSQL integration) [x] By ID succeeds when a document is updated [x] By ID succeeds when no document is updated [x] By fields succeeds when a document is updated [x] By fields succeeds when no document is updated [x] By contains succeeds when documents are updated [x] By contains succeeds when no documents are updated [x] By JSON Path succeeds when documents are updated [x] By JSON Path succeeds when documents are not updated Patch (SQLite integration) [x] By ID succeeds when a document is updated [x] By ID succeeds when no document is updated [x] By fields succeeds when a document is updated [x] By fields succeeds when no document is updated [x] By contains fails [x] By JSON Path fails Patch Queries (Unit tests) [x] By ID succeeds for PostgreSQL [x] By ID succeeds for SQLite [x] By ID fails when mode not set [x] By fields succeeds for PostgreSQL [x] By fields succeeds for SQLite [x] By fields fails when mode not set [x] By contains succeeds for PostgreSQL [x] By contains fails for non PostgreSQL [x] By JSON Path succeeds for PostgreSQL [x] By JSON Path fails for non PostgreSQL Query (Unit tests) [x] Select from table succeeds [x] Where by fields succeeds for single field [x] Where by fields succeeds for multiple fields all [x] Where by fields succeeds for multiple fields any [x] Where by ID succeeds with default parameter [x] Where by ID succeeds with specific parameter [x] Where data contains succeeds with default parameter [x] Where data contains succeeds with specified parameter [x] Where data contains fails if not PostgreSQL [x] Where JSON Path matches succeeds with default parameter [x] Where JSON Path matches succeeds with specified parameter [x] Where JSON Path matches 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 Remove Fields (PostgreSQL integration) [x] By ID succeeds when fields are removed [x] By ID succeeds when a field is not removed [x] By ID succeeds when no document is matched [x] By fields succeeds when a field is removed [x] By fields succeeds when a field is not removed [x] By fields succeeds when no document is matched [x] By contains succeeds when a field is removed [x] By contains succeeds when a field is not removed [x] By contains succeeds when no document is matched [x] By JSON Path succeeds when a field is removed [x] By JSON Path succeeds when a field is not removed [x] By JSON Path succeeds when no document is matched Remove Fields (SQLite integration) [x] By ID succeeds when fields are removed [x] By ID succeeds when a field is not removed [x] By ID succeeds when no document is matched [x] By fields succeeds when a field is removed [x] By fields succeeds when a field is not removed [x] By fields succeeds when no document is matched [x] By contains fails [x] By JSON Path fails Remove Fields Queries (Unit tests) [x] Update succeeds for PostgreSQL [x] Update succeeds for SQLite [x] Update fails when mode not set [x] By ID succeeds for PostgreSQL [x] By ID succeeds for SQLite [x] By ID fails when mode not set [x] By fields succeeds for PostgreSQL [x] By fields succeeds for SQLite [x] By fields fails when mode not set [x] By contains succeeds for PostgreSQL [x] By contains fails for non PostgreSQL [x] By JSON Path succeeds for PostgreSQL [x] By JSON Path 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