@@ -48,13 +48,13 @@ The database document interface only supports primitives types (`strings`, `inte
4848
4949Below is a list of supported databases, and their compatibly tested versions alongside a list of supported features and relevant limits.
5050
51- | Adapter | Status | Version |
52- | --------- | ---------| ---|
53- | MariaDB | ✅ | 10.5 |
54- | MySQL | ✅ | 8.0 |
55- | Postgres | ✅ | 13.0 |
56- | MongoDB | ✅ | 5.0 |
57- | SQLlite | ✅ | 3.38 |
51+ | Adapter | Status | Version |
52+ | -------- | ------ | ------- |
53+ | MariaDB | ✅ | 10.5 |
54+ | MySQL | ✅ | 8.0 |
55+ | Postgres | ✅ | 13.0 |
56+ | MongoDB | ✅ | 5.0 |
57+ | SQLite | ✅ | 3.38 |
5858
5959` ✅ - supported `
6060
@@ -200,7 +200,7 @@ $pdoConfig = [
200200 PDO::ATTR_STRINGIFY_FETCHES => true,
201201];
202202
203- $pdo = new PDO("{$dbPath}", $pdoConfig);
203+ $pdo = new PDO("sqlite: {$dbPath}", $pdoConfig);
204204
205205$cache = new Cache(new Memory()); // or use any cache adapter you wish
206206
@@ -228,7 +228,7 @@ $mongoClient = new Client($dbName, $dbHost, $dbPort, $dbUser, $dbPass, true);
228228
229229$cache = new Cache(new Memory()); // or use any cache adapter you wish
230230
231- $database = new Database(new Mongo($client ), $cache);
231+ $database = new Database(new Mongo($mongoClient ), $cache);
232232```
233233
234234### Database Methods
@@ -293,7 +293,6 @@ Database::EVENT_DOCUMENT_CREATE,
293293Database::EVENT_DOCUMENT_UPDATE,
294294Database::EVENT_DOCUMENT_READ,
295295Database::EVENT_DOCUMENT_FIND,
296- Database::EVENT_DOCUMENT_FIND,
297296Database::EVENT_DOCUMENT_COUNT,
298297Database::EVENT_DOCUMENT_SUM,
299298Database::EVENT_DOCUMENT_INCREASE,
@@ -667,7 +666,7 @@ Role::members(
667666Permission::read(Role::any()),
668667Permission::create(Role::user(ID::unique())),
669668Permission::update(Role::user(ID::unique(padding: 23))),
670- Permission::delete(Role::user(ID::custom(id: 'my_user_3235'))
669+ Permission::delete(Role::user(ID::custom(id: 'my_user_3235')))
671670
672671// To create a document
673672$document = new Document([
@@ -794,7 +793,7 @@ $database->find(
794793 collection: 'movies',
795794 queries: [
796795 Query::equal(attribute: 'name', values: ['Captain Marvel']),
797- Query::notEqual(attribute: 'year', values: [ 2019] )
796+ Query::notEqual(attribute: 'year', value: 2019)
798797 ],
799798 timeout: 1 //timeout is optional
800799);
@@ -850,7 +849,7 @@ Utopia Framework requires PHP 8.0 or later. We recommend using the latest PHP ve
850849## Contributing
851850
852851Thank you for considering contributing to the Utopia Framework!
853- Checkout the [ CONTRIBUTING.md] ( https://github.com/utopia-php/database/blob/main/CONTRIBUTING.md ) file for more information.
852+ Check out the [ CONTRIBUTING.md] ( https://github.com/utopia-php/database/blob/main/CONTRIBUTING.md ) file for more information.
854853
855854## Copyright and License
856855
0 commit comments