23 Commits

Author SHA1 Message Date
a10ecbb1cd Pass integer IDs as-is 2024-06-08 12:57:13 -04:00
2d8f8b6e87 Finish tests
- Add sub-doc handling for SQLite fields
- Add casting for PostgreSQL BT on numeric value
- Add hasItems() to DocumentList
- Fix SQL syntax problems exposed by tests
2024-06-08 10:49:52 -04:00
a96fdf9d14 Add Count and Document SQLite integration tests 2024-06-07 23:35:48 -04:00
9fba3781d6 Add SQLite Patch integration tests
- Use multiple-class use statements
2024-06-07 23:06:31 -04:00
1ab961e35a Change PDO to singleton instance
- Add SQLite throwaway DB implementation
- Add integration tests for Custom class
2024-06-07 22:14:17 -04:00
d9ffc36fe6 Use PDO singleton 2024-06-07 20:57:12 -04:00
bcca9f5ace Missed document param prefix updates 2024-06-04 22:36:58 -04:00
1e7c41eaa2 Derive data type for bindValue call
Remove debugging in document list
2024-06-04 22:24:27 -04:00
50b4104e02 undo last commit 2024-06-04 22:00:00 -04:00
85786fa113 where are the results 2024-06-04 21:53:02 -04:00
71ae46fac7 Make properties public 2024-06-04 21:49:30 -04:00
259247464a Even more debug 2024-06-04 21:36:36 -04:00
b871d3e03f Add more debug 2024-06-04 21:34:17 -04:00
4342d1ac50 Add debug to document list 2024-06-04 21:28:12 -04:00
3d45bbcabc Change param prefix from @ to : 2024-06-04 20:59:24 -04:00
7390ae0f61 Do not construct a list for a single item query 2024-06-04 20:18:38 -04:00
cecbb51414 Fix scalar, add conn mgt 2024-06-04 20:12:42 -04:00
c2dc111dce WIP on connection management 2024-06-04 19:55:22 -04:00
afc5d80095 Migrate remaining implementation 2024-06-04 08:10:57 -04:00
b705130624 Add support, custom, and other queries 2024-06-03 23:10:12 -04:00
98bfceb7c9 Add mode, bring in definition/patch queries 2024-06-03 21:09:03 -04:00
ecc13a30cf Add PDO connection config 2024-06-03 20:13:45 -04:00
1164dc7cc5 Add classes and tests from common project 2024-06-03 19:46:39 -04:00
4 changed files with 3 additions and 33 deletions

4
.gitattributes vendored
View File

@@ -1,4 +0,0 @@
.gitignore export-ignore
.gitattributes export-ignore
composer.lock export-ignore
tests/**/* export-ignore

View File

@@ -1,11 +1,3 @@
# PDODocument
# pdo-document
This library allows SQLite (and, by v1.0.0-beta1, PostgreSQL) to be treated as a document database. It is a PHP implementation of the .NET [BitBadger.Documents](https://git.bitbadger.solutions/bit-badger/BitBadger.Documents) library.
## Add via Composer
`compose require bit-badger/pdo-document`
## Usage
Documentation for this library is not complete; however, its structure is very similar to the .NET version, so [its documentation will help](https://bitbadger.solutions/open-source/relational-documents/basic-usage.html) until its project specific documentation is developed. Things like `Count.All()` become `Count::all`, and all the `byField` operations are named `byFields` and take an array of fields.
Bit Badger Documents PHP implementation with PDO

View File

@@ -1,23 +1,6 @@
{
"name": "bit-badger/pdo-document",
"description": "Treat SQLite (and soon PostgreSQL) as a document store",
"keywords": ["database", "document", "sqlite", "pdo"],
"license": "MIT",
"authors": [
{
"name": "Daniel J. Summers",
"email": "daniel@bitbadger.solutions",
"homepage": "https://bitbadger.solutions",
"role": "Developer"
}
],
"support": {
"email": "daniel@bitbadger.solutions",
"source": "https://git.bitbadger.solutions/bit-badger/pdo-document",
"rss": "https://git.bitbadger.solutions/bit-badger/pdo-document.rss"
},
"require": {
"php": ">=8.3",
"netresearch/jsonmapper": "^4",
"ext-pdo": "*"
},

3
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ca79f450e8e715ad61ba3581734c0fe7",
"content-hash": "eada4b7eb6f976e0aaf0b54b92e2ca32",
"packages": [
{
"name": "netresearch/jsonmapper",
@@ -1697,7 +1697,6 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=8.3",
"ext-pdo": "*"
},
"platform-dev": [],