Phi Docs
Select a guide from the sidebar or choose a topic below to get started.
Quickstart
Install the Phi CLI, create a project, define a schema, migrate, and generate the type-safe Go ORM client.
Create Records
Create one or more records.
Read Records
Query records using FindUnique, FindFirst, and FindMany.
Update Records
Update one or more records using type-safe update builders.
Delete Records
Delete one or more records using type-safe delete builders.
Upsert Records
Configure conflict handling for create operations.
Count Records
Count the number of records matching a set of predicates.
Select
Select specific fields and relations to return from a query.
Omit
Omit specific scalar fields from a query result.
Query Filters
The predicate system for filtering records with EQ, NEQ, GT, LT, In, Contains, Like, and logical operators.
Take
Limit the number of records returned by a query. Mirrors SQL's LIMIT.
Skip
Skip a number of matching records before returning results. Mirrors SQL's OFFSET.
Order By
Sort query results using Asc or Desc on any scalar field. Mirrors SQL's ORDER BY.
Cursor
Fetch pages of results relative to a known record, identified by a unique predicate.
Page Title
A short summary of this guide (used in search results and meta description).