How to execute a random postgresql-query.
someone
someone at somewhere.com
Wed Jun 30 01:15:22 UTC 2021
On Tuesday, 29 June 2021 at 23:32:21 UTC, SealabJaster wrote:
> Not who you were asking but: they just don't work.
Doesn't matter, you're welcome :)
> Maybe they don't support Windows for one reason or another.
>
> Maybe their abstraction for whatever reason isn't able to
> handle basic types for the database backend (true story).
>
> Maybe they have weird, non-nonsensical errors, or for some
> reason just can't connect when nothing else is wrong.
>
> And maybe, sometimes they decide to just crash for random
> reasons. e.g. I tried to use the Hunt database library
> recently, and it's dtor would crash because it was missing a
> null check or something.
I would love to see D as a first-class citizen on postgreSQL like
C ... just dreaming of. My first impressions so far (which I will
eventually post here) are in the line of: terrific language,
really-powerful, a joy to code with. So dreaming of seeing it
integrated to something like postgreSQL is like ... well,
faaantastic. I can imagine writing very sophisticated
stored-procedures right within-the-database. Man, a killer
feature, well-ahead of C.
> So I (and likely others) decide to just write our own. In my
> own case I just wanted to run super simple queries with super
> simple results, so made a very tiny wrapper around postgres' C
> library:
> https://github.com/BradleyChatha/dubstats2/blob/master/d/database/source/database.d
What do you think of the possibility of making a coordinated
effort to tackle a definitive pglib binding to D providing we
start with very-well defined requirements and not going farther
than needed to begin with ? I think we could start with x basic
access, then make something intermediate access (not even
touching the basic one), then advanced, whatever. I mean, not
leaving the users of basic access spoiled when we are working a
few steps higher and making the development mistakes every
component will bring in. Just thinking.
> I used a tool called DStep to automatically convert the headers
> I needed over to D, and with a few manual tweaks, everything
> just worked. No hassle, no random shenanigans, I could actually
> _start the project_ instead of wrestling with 20 different
> libraries.
> There's a comment in the top of that file that describes my
> general feelings towards most dub libraries.
Just seen it. When I stop coding for a while (I mean, learning D
with my test-bed demo -not even a project yet), I use to browse
the forum more-or-less in random order to take a glimpse of how
things work (or not) in D-land; and I encountered lots of
complains like you say for dub libraries and the like, so I
suppose taking away some very few major-ones they tend to be poor
quality at the least, not a complain of mine, to be clear, just
stating what I am seeing.
> If you don't stick with the top libraries, you're basically in
> a barren wasteland in terms of "will this shit even work?" and
> "I could've just written my own version in the hours/days it's
> taken me to get this damn thing to do anything".
Top-libraries or else ... crystal-clear.
More information about the Digitalmars-d-learn
mailing list