Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed Oct 2, 2023
1 parent 0627d70 commit 3f2b978
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ composer require renoki-co/l1

### D1 with raw PDO

Though D1 is not a relational database, it can be used as a PDO driver via our connector.
Though D1 is not connectable via SQL protocols, it can be used as a PDO driver via the package connector. This proxies the query and bindings to the D1's `/query` endpoint in the Cloudflare API.

```php
use RenokiCo\L1\D1\D1Pdo;
use RenokiCo\L1\D1\D1PdoStatement;
use RenokiCo\L1\CloudflareD1Connector;

$pdo = new D1Pdo(
dsn: 'sqlite::memory:',
dsn: 'sqlite::memory:', // irrelevant
connector: new CloudflareD1Connector(
database: 'your_database_id',
token: 'your_api_token',
Expand Down

0 comments on commit 3f2b978

Please sign in to comment.