The "Local Query Engine (SQLite) - Demo" application provides a comprehensive introduction to using the Local Query Engine (SQLite) component within OutSystems. By following the examples and testing custom commands, you can quickly learn how to integrate and utilize the component for executing SQL operations on local databases. This demo is an essential resource for developers looking to enhance their applications with powerful client-side database management capabilities.
New
- SQL Playground: a new red-and-black glass-style screen with an SQL editor (syntax highlighting, autocomplete for local tables and columns, Ctrl + Enter to run), result stats (status, statement type, rows, rows affected, time) and a Table / JSON view of the result.
- Sample query library: 34 ready-to-run queries in 6 groups - Read data, Aggregates, Advanced analytics, Write data (DML), Parameters & safety, and Error scenarios.
- Shows the new component features: Parameters (? placeholders), ReadOnly mode, ErrorMessage, RowCount, RowsAffected, StatementType and DurationMs.
- Data Check screen: reads the same data with a local aggregate and with ExecuteQuery and compares every row and value, plus the row count of all six local tables, to show that no data is lost.
- Sample data: "Sync sample data" now fills the server with demo groups, subjects, teachers, students, subject-teacher links and marks before syncing, so every sample query returns data. Rows are only added when they do not exist yet, so it is safe to press again.
- Responsive layout for phone, tablet and desktop.
- Footer: "Made with ❤️ using OutSystems."
Improvements and fixes
- Removed duplicate sample queries.
- Fixed the "Insert a New Student" sample (it now provides the Id, which LocalStudents needs).
- Fixed the "Delete a Subject-Teacher Association" sample so it no longer depends on hardcoded IDs.
- Removed fixed delays (1 and 5 seconds) when opening the editor and showing results.
- Results are rendered as plain text, so data from the database cannot inject HTML.
- Styling moved from inline styles to theme CSS classes.
Notes
- The demo screens are open to anonymous users, and "Sync sample data" writes demo rows to the demo's own server entities.
- Tested in the browser (OutSystems 11 Personal Environment). The native mobile build has not been tested on a device yet.