Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Models

A Model in Cloesce defines a structure hydrated from some sources of persistent data, such as a D1 database, Durable Object, KV namespace, or R2 bucket.

Once defined, a Model is a first class citizen across the frontend, backend, and database layers of your application, capable of housing API endpoints and being serialized for the client.

In this chapter, we will explore the various features of Cloesce Models, including: