Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ The database document interface only supports primitives types (`strings`, `inte

Below is a list of supported databases, and their compatibly tested versions alongside a list of supported features and relevant limits.

| Adapter | Status | Version |
|---------|---------|---|
| MariaDB | ✅ | 10.5 |
| MySQL | ✅ | 8.0 |
| Postgres | ✅ | 13.0 |
| MongoDB | ✅ | 5.0 |
| SQLlite | ✅ | 3.38 |
| Adapter | Status | Version |
| -------- | ------ | ------- |
| MariaDB | ✅ | 10.5 |
| MySQL | ✅ | 8.0 |
| Postgres | ✅ | 13.0 |
| MongoDB | ✅ | 5.0 |
| SQLite | ✅ | 3.38 |

` ✅ - supported `

Expand Down Expand Up @@ -200,7 +200,7 @@ $pdoConfig = [
PDO::ATTR_STRINGIFY_FETCHES => true,
];

$pdo = new PDO("{$dbPath}", $pdoConfig);
$pdo = new PDO("sqlite:{$dbPath}", $pdoConfig);

$cache = new Cache(new Memory()); // or use any cache adapter you wish

Expand Down Expand Up @@ -228,7 +228,7 @@ $mongoClient = new Client($dbName, $dbHost, $dbPort, $dbUser, $dbPass, true);

$cache = new Cache(new Memory()); // or use any cache adapter you wish

$database = new Database(new Mongo($client), $cache);
$database = new Database(new Mongo($mongoClient), $cache);
```

### Database Methods
Expand Down Expand Up @@ -293,7 +293,6 @@ Database::EVENT_DOCUMENT_CREATE,
Database::EVENT_DOCUMENT_UPDATE,
Database::EVENT_DOCUMENT_READ,
Database::EVENT_DOCUMENT_FIND,
Database::EVENT_DOCUMENT_FIND,
Database::EVENT_DOCUMENT_COUNT,
Database::EVENT_DOCUMENT_SUM,
Database::EVENT_DOCUMENT_INCREASE,
Expand Down Expand Up @@ -667,7 +666,7 @@ Role::members(
Permission::read(Role::any()),
Permission::create(Role::user(ID::unique())),
Permission::update(Role::user(ID::unique(padding: 23))),
Permission::delete(Role::user(ID::custom(id: 'my_user_3235'))
Permission::delete(Role::user(ID::custom(id: 'my_user_3235')))

// To create a document
$document = new Document([
Expand Down Expand Up @@ -794,7 +793,7 @@ $database->find(
collection: 'movies',
queries: [
Query::equal(attribute: 'name', values: ['Captain Marvel']),
Query::notEqual(attribute: 'year', values: [2019])
Query::notEqual(attribute: 'year', value: 2019)
],
timeout: 1 //timeout is optional
);
Expand Down Expand Up @@ -850,7 +849,7 @@ Utopia Framework requires PHP 8.0 or later. We recommend using the latest PHP ve
## Contributing

Thank you for considering contributing to the Utopia Framework!
Checkout the [CONTRIBUTING.md](https://github.com/utopia-php/database/blob/main/CONTRIBUTING.md) file for more information.
Check out the [CONTRIBUTING.md](https://github.com/utopia-php/database/blob/main/CONTRIBUTING.md) file for more information.

## Copyright and License

Expand Down
Loading