Hacker GitHub

← All repos

codemix/ts-sql

View on GitHub ↗ ★ 3,305 TypeScript

A SQL database implemented purely in TypeScript type annotations.

22 mentions on Hacker News by 17 people: 2 stories, 20 comments · first 2020-09-21 · latest 2024-11-02

Mentions per year 22 mentions · busiest year 2020 (7)
20082026
  1. …but also some insane stuff like: - A SQL database implemented purely in TypeScript type system ( https://github.com/codemix/ts-sql ) - Chess implemented entirely in TypeScript (and Rust) type systems (…
  2. …towards dependent types. Some examples of TypeScript power: - SQL database in TypeScript types: https://github.com/codemix/ts-sql - Statically typed raw SQL queries: https://github.com/andywer/squid?tab=readme-ov-file#tag-func... -…
  3. …of SQL that operates on a table shaped type, entirely at type level. For your amusement: https://github.com/codemix/ts-sql There are a bunch of more practical takes that codegen types from your database and generate types for your queries,…
    comment by jitl · 2024-03-24 · in Type-Safe Printf() in TypeScript
  4. https://github.com/codemix/ts-sql
  5. SQL implemented in typescript types - https://github.com/codemix/ts-sql
  6. …system is incredibly expressive. You rarely run into an idiom that can't be typed effectively. [1] https://github.com/codemix/ts-sql [2] https://twitter.com/buildsghost/status/1301976526603206657 [3] https://github.com/microsoft/TypeScript/…
    comment by Vaguely2178 · 2023-05-15 · in How to sell Elixir again
  7. …see some more legs on TypeScript type-level logic, check out this SQL database as Typescript types: https://github.com/codemix/ts-sql : import { Query } from "@codemix/ts-sql"; const db = { things: [ { id: 1, name: "a", active: true }, {…
  8. …type that implements a simplified SQL query parser checked against a provided 'database' object: https://github.com/codemix/ts-sql This project was my go-to "nifty but pointless" example for TS string literal types before this article :)
  9. author of ts-sql[0] here, this looks great (and a way more practical approach!) [0] https://github.com/codemix/ts-sql
  10. Another example, SQL-database-in-the-typescript-typesystem here https://github.com/codemix/ts-sql This would have been much easier if I'd had ts-regexp at the time :)
  11. …you? Here are some of my favorites: https://gist.github.com/hediet/63f4844acf5ac330804801084f87a... https://github.com/codemix/ts-sql https://github.com/jamiebuilds/json-parser-in-typescript-ver... https://gist.github.com/acutmore/9d2ce837f…
    comment by chana_masala · 2021-10-12 · in Tricks I wish I knew when I learned TypeScript
  12. Here you go! https://github.com/codemix/ts-sql import { Query } from "@codemix/ts-sql"; const db = { things: [ { id: 1, name: "a", active: true }, { id: 2, name: "b", active: false }, { id: 3, name: "c", active: true }, ], } as const; type…
  13. https://github.com/codemix/ts-sql might be worth looking at, at least the parsing section.
  14. Maybe this may help as some inspiration https://github.com/codemix/ts-sql
    comment by lukeramsden · 2021-06-20 · in Postgres to TypeScript Interfaces and Enums
  15. …is turning complete. This example shows how to derive types from string based sql statement: https://github.com/codemix/ts-sql
    comment by aabbcc1241 · 2021-05-15 · in Scala 3.0
  16. Type-level SQL interpreter: https://github.com/codemix/ts-sql
    comment by Kinrany · 2020-11-20 · in TypeScript 4.1
  17. …use of it with the beta, it’s extremely useful. Edit: see this SQL made out of the type system: https://github.com/codemix/ts-sql
    comment by IggleSniggle · 2020-11-20 · in TypeScript 4.1
  18. …can be used to make a type checker for SQL strings like https://github.com/MedFlyt/mfsqlchecker or https://github.com/codemix/ts-sql but for C# I will be stoked!
    comment by gfody · 2020-11-10 · in .NET 5.0
  19. Inspired by ts-sql ( https://github.com/codemix/ts-sql ) and json-parser-in-typescript-very-bad-idea-please-dont-use ( https://github.com/jamiebuilds/json-parser-in-typescript-ver... ) I decided to try writing a tic tac toe ai in…
  20. Are you really calling this ergonomic? https://github.com/codemix/ts-sql/blob/master/src/Evaluator.... Same thing but actually readable and maintanable would've been better implemented as a compile-time (build-time) script, basically…
  21. ▲ 426
    Show HN: A SQL database implemented purely in TypeScript type annotations
    story by phpnode · 2020-09-28 · 191 comments
  22. ▲ 4
    An SQL database implemented in TypeScript type annotations
    story by Kinrany · 2020-09-21 · 0 comments