logoalt Hacker News

ryanrastitoday at 12:50 AM0 repliesview on HN

Typegres - SQL over RPC safely (safely compose queries over Cap'n Web):

At a high level: 1. Define your schema: TS classes model each one of your underlying tables. 2. Encapsulate your schema: Add methods on those classes (encapsulation 101 applied to your database) -- that compile down to SQL. This gives you the equivalent of computed columns and first-class relations 3. Expose your API: explicitly mark members of your classes to expose 4. Use it: Now - and this is the crazy part - the client (e.g., a web browser) can use your data-model directly to query data with SQL-level power (joins, aggregations, etc -- compiling into a single query) over RPC, securely!

Real example visuals are better at describing it: https://typegres.com/

Recently added SQLite support and live queries; playground shows the live queries: https://typegres.com/play/