Database
Connect to a database, run queries, and edit data or table structures in Fricle. Database supports SQLite, PostgreSQL, MySQL, DynamoDB, MongoDB, and Redis. The commands and editing options depend on the provider and your permissions.
Example · Review last month’s orders in PostgreSQL
In Database, select Add connection and choose PostgreSQL. Enter the team's server and credentials, then select Test connection and Save. To edit the saved connection later, open Connection settings.
Open New query, enter the query below, and choose Execute current statement. Read the order counts and totals by status in the results grid.
sql SELECT status, COUNT(*) AS orders, SUM(total) AS total_sales FROM public.orders WHERE ordered_at >= date_trunc('month', CURRENT_DATE) - INTERVAL '1 month' AND ordered_at < date_trunc('month', CURRENT_DATE) GROUP BY status ORDER BY status;To correct an individual order, open public → Tables → orders in the database sidebar. Edit the status in the table grid and select Apply changes. The aggregate results above are read-only.
To add a column, open the table’s menu and choose Alter table…. Add the column and select Apply changes. Check the generated statement in Apply SQL script to database, then select Apply changes there to run it.
For a query you run regularly, use Save editor text as a snippet (selection, or all) and find it later under Snippets.
Example · Open a local SQLite file
Open sales.sqlite from Documents, select sales, and check the $48 total for receipt R-103.
