All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Durable Objects, Workers - SQLite in Durable Objects GA with 10GB storage per object

1y ago

Source

CloudflareDurable Objects, Workers - SQLite in Durable Objects GA with 10GB storage per objectcloudflare.com
Snippet from the RSS feed
SQLite in Durable Objects is now generally available (GA) with 10GB SQLite database per Durable Object. Since the public beta in September 2024, we've added feature parity and robustness for the SQLite storage backend compared to the preexisting key-value (KV) storage backend for Durable Objects. SQLite-backed Durable Objects are recommended for all new Durable Object classes, using new_sqlite_classes Wrangler configuration . Only SQLite-backed Durable Objects have access to Storage API's SQL and point-in-time recovery methods, which provide relational data modeling, SQL querying, and better data management. export class MyDurableObject extends DurableObject { sql : SqlStorage constructor ( ctx : DurableObjectState , env : Env ) { super ( ctx , env ) ; this . sql = ctx . storage . sql ; } async sayHello () { let result = this . sql . exec ( "SELECT 'Hello, World!' AS greeting" ) . one () ; return result . greeting ; } } KV-backed Durable Objects remain for backwards compatibility, and a migration path from key-value storage to SQL storage for existing Durable Object classes will be offered in the future. For more details on SQLite storage, checkout Zero-latency SQLite storage in every Durable Object blog .

You might also wanna read

Comments

Sign in to join the conversation.

No comments yet. Be the first.