mmkal / pgkit

PostgreSQL🤝TypeScript monorepo. SQL client/admin UI/smart migrator/type generator/schema inspector
https://pgkit.dev
175 stars 24 forks source link

@pgkit/client: Compatibility with SafeQL? #427

Open karlhorky opened 3 weeks ago

karlhorky commented 3 weeks ago

Hi @mmkal, hope things are going good for you!

I'm a big fan of what you're doing over here (also elsewhere in the ecosystem)! Especially appreciate the idea of potentially alleviating problems with growth of migrations files by building a single-file migrations workflow on @pgkit/migra. Anyway, that's off-topic for this issue.

SafeQL by @Newbie012 is an ESLint plugin which uses TypeScript types and PostgreSQL diagnostic information to lint SQL.

I noticed on the SafeQL docs website that @pgkit/client is not mentioned:

Screenshot 2024-08-25 at 13 28 33

Do you know if it works out of the box with SafeQL? And if so, should there be a section added to the SafeQL docs?

mmkal commented 3 weeks ago

I haven't tried it, but yes it should work! I'm planning on bringing pgkit in general up to speed over the coming weeks, I'm avoiding advertising it in the meantime. So I'll keep this open and hold off putting it in there, I'd rather not send too many people this direction before it's ready unless they're particularly keen early adopters. The status is a little confusing since this grew out of slonik-tools. Next thing I want to tackle is the typegen lib which hasn't really been upgraded since it was slonik based. I think there can be big improvements now it can rely on schemainspect. (But also, typegen has the most overlap with other libs like SafeQL so I will consider how it should meaningfully differentiate)

karlhorky commented 3 weeks ago

Ok great thanks for the update and the note about the upcoming plans! I'll hold off for now. Looking forward to seeing more in the next weeks 👀