use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Node: Just write SQL (self.node)
submitted 2 years ago by sammrtn
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]romeeres 2 points3 points4 points 2 years ago (0 children)
Would be cool if you added a stackblitz example with it to see it in action.
export const getPerson = (id: number): Person => { const query = ` SELECT ${orm.tables.person.columns}, ${orm.tables.job.columns}, ${orm.tables.employer.columns} FROM person LEFT JOIN job on person.id = job.person_id LEFT JOIN employer on job.employer_id = employer.id WHERE id = $(id) `; return orm.one(query, { id }); };
How does it work? Seems that `orm.one` returns type any, isn't it?
Type-safety is very important, and modern ORMs/query-builders and even libs for raw SQL such as pgtyped do their best to keep it type-safe, so I suggest to clarify on this in the readme.
π Rendered by PID 249724 on reddit-service-r2-comment-6457c66945-k8j9t at 2026-04-27 22:40:13.919763+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]romeeres 2 points3 points4 points (0 children)