Meta tags:
Headings (most frequently used words):
postgresql, query, sql, interpolating, quasiquote, plus, some, kind, of, primitive, orm, using, it, what, motivation, sqlexp, modules, downloads, readme, for, 10, sqlexpembed, and, sqlexpfile, maintainer, corner,
Text of the page (most frequently used words):
query (42), #postgresql (29), database (22), name (16), and (13), sql (11), #sqlexp (11), you (10), just (9), like (8), for (8), package (8), this (7), the (6), inside (6), not (6), from (6), condlist (6), age (6), where (5), quasiquote (5), sqlbuilder (5), minage (5), maxage (5), entity (5), string (4), use (4), which (4), using (4), tofield (4), peyton (4), cond (4), what (4), some (4), simple (4), hackage (3), sqlexpfile (3), can (3), interpolation (3), will (3), all (3), identifier (3), write (3), has (3), instance (3), builder (3), type (3), let (3), parameters (3), field (3), catmaybes (3), mconcat (3), select (3), users (3), const (3), con (3), complex (3), now (3), perform (3), orm (3), interpolating (3), git (3), com (3), s9gf4ult (3), ghc (3), transformers (3), cabal (2), same (2), your (2), are (2), pgquery (2), foo (2), bar (2), works (2), templates (2), sqlexpembed (2), realy (2), template (2), comments (2), literals (2), quoted (2), identifiers (2), similar (2), nested (2), block (2), comment (2), even (2), line (2), well (2), bytestring (2), pastes (2), arbitrary (2), value (2), typeclass (2), exp (2), about (2), when (2), much (2), assume (2), getting (2), ord (2), null (2), then (2), mempty (2), else (2), intersperse (2), order (2), mistake (2), paramlist (2), more (2), paste (2), yesterday (2), library (2), generation (2), contains (2), description (2), readme (2), last (2), 2022 (2), log (2), rating (2), downloads (2), details (2), dependencies (2), github (2), source (2), alekseyuymanov (2), maintainer (2), base (2), lift (2), haskell (2), monad (2), candidates (2), maintainers (2), browse (2), types (2), class (2), internal (2), functions (2), plus (2), kind (2), primitive (2), produced, absolutely, above, prepends, appends, agree, follow, naming, conventions, welcome, yesod, have, huge, hardcore, remove, interpolate, strange, ololo, correctly, handles, also, removes, resulting, sequences, space, characters, free, queries, returns, made, effective, concatination, monoid, tosqlbuilder, performs, correct, strings, escaping, stupid, dont, worry, injections, two, way, better, special, names, pqquery, many, chances, make, could, next, example, oups, get, our, right, syntax, assumes, parameter, optional, here, did, see, forgot, ordering, must, need, instead, signs, count, inner, join, posts, user_id, created, between, group, want, writing, hands, that, motivation, but, part, back, docs, available, success, reported, reports, build, status, votes, estimated, bayesian, average, 17779, total, days, direct, indirect, reverse, stackage, distributions, head, clone, repo, https, home, page, category, 22t18, 16z, uploaded, gmail, aleksey, uimanov, author, bsd, clause, license, tested, with, compat, time, instances, text, semigroups, resource, pool, mtl, logger, control, inflections, hset, hreader, src, meta, file, embed, exceptions, data, default, containers, blaze, attoparsec, aeson, changelog, change, info, versions, rss, edit, information, trustees, corner, included, tar, row, enum, common, quick, jump, index, modules, skip, report, vulnerability, propose, tags, bsd3, user, accounts, upload, new, search,
Text of the page (random words):
postgresql query sql interpolating quasiquote plus some kind of primitive orm using it hackage package search browse what s new upload user accounts postgresql query sql interpolating quasiquote plus some kind of primitive orm using it bsd3 database library propose tags report a vulnerability skip to readme modules index quick jump database postgresql database postgresql query database postgresql query entity database postgresql query entity class database postgresql query entity functions database postgresql query entity internal database postgresql query functions database postgresql query internal database postgresql query sqlbuilder database postgresql query sqlbuilder builder database postgresql query sqlbuilder class database postgresql query sqlbuilder types database postgresql query th database postgresql query th common database postgresql query th entity database postgresql query th enum database postgresql query th row database postgresql query th sqlexp database postgresql query types downloads postgresql query 3 10 0 tar gz browse cabal source package package description as included in the package maintainer s corner package maintainers alekseyuymanov for package maintainers and hackage trustees edit package information candidates no candidates versions rss 1 0 0 1 0 1 1 1 0 1 1 1 1 2 0 1 2 1 1 3 0 1 3 1 1 4 0 2 0 0 2 1 0 2 2 0 2 3 0 3 0 0 3 0 1 3 1 0 3 2 0 3 3 0 3 4 0 3 5 0 3 6 0 3 7 0 3 8 0 3 8 1 3 8 2 3 9 0 3 10 0 info change log changelog md dependencies aeson attoparsec base 4 6 5 blaze builder bytestring containers data default exceptions file embed haskell src meta hreader 1 0 0 2 0 0 hset 2 0 0 3 0 0 inflections 0 2 1 monad control 0 3 3 1 1 0 0 3 monad logger mtl postgresql simple 0 4 10 0 resource pool semigroups template haskell text th lift th lift instances time transformers transformers base transformers compat 0 3 details tested with ghc 9 2 4 ghc 9 0 2 ghc 8 6 5 license bsd 3 clause author aleksey uimanov maintainer s9gf4ult gmail com uploaded by alekseyuymanov at 2022 08 22t18 13 16z category database home page https github com s9gf4ult postgresql query source repo head git clone git github com s9gf4ult postgresql query git distributions stackage 3 10 0 reverse dependencies 3 direct 0 indirect details downloads 17779 total 67 in the last 30 days rating 2 0 votes 1 estimated by bayesian average your rating λ λ λ status docs available build log last success reported on 2022 08 22 all 1 reports readme for postgresql query 3 10 0 back to package description what postgresql query is a library for more simple query generation for postgresql database it is not an orm but contains some part of it contains interpolating quasiquote for simple query generation motivation when you want to perform some complex sql query using postgresql simple you writing this query by hands like that let q mconcat select u id u name count p id from users as u inner join posts as p on u id p user_id where u name like and u created between and group by u id order by well this is not realy complex now what you need to perform the query is to paste parameters instead of this signs query con q peyton now yesterday did you see the mistake we forgot about ordering field to perform this query we must query con q peyton now yesterday identifier oups if we use identifier u name we will get u name in our query which is just not right sql syntax assumes u name for this query we can not use query parameter to paste optional field here next example is more complex let name just peyton assume we getting parameters from query minage just 10 maxage just 50 condlist catmaybes const u name like name const u age minage const u age maxage paramlist catmaybes tofield name tofield minage tofield maxage cond if l null condlist then mempty else where mconcat l intersperse and condlist q select u id u name u age from users as u cond query con q paramlist so much to write and so many chances to make a mistake what if we could write this like let name just peyton assume we getting parameters from query minage just 10 maxage just 50 ord u name fn special type for field names condlist catmaybes a sqlexp u name like a name a sqlexp u age a minage a sqlexp u age a maxage cond if l null condlist then mempty else sqlexp where mconcat l intersperse and condlist pqquery sqlexp select u id u name u age from users as u cond order by ord much better sqlexp quasiquote sqlexp has two way of interpolation exp pastes inside query arbitrary value which type is instance of tofield typeclass it performs correct strings escaping so it is not the same as stupid string interpolation dont worry about sql injections when using it exp pastes inside query arbitrary value which type has instance of tosqlbuilder typeclass sqlexp returns sqlbuilder which has a monoid instance and made for effective concatination bytestring builder works inside this quasiquote correctly handles string literals and quoted identifiers it also removes line and block even nested sql comments from resulting query as well as sequences of space characters you are free to write queries like where name similar to 2 3 line comment ololo or even where strange identifier similar to 1 10 nested block comment sqlexp will remove all comments and will not interpolate inside string literals or quoted identifiers at all sqlexpembed and sqlexpfile if you have realy huge hardcore sql template you can pgquery sqlexpembed sql foo bar sql it works just like yesod s templates you can use interpolation inside templates like inside sqlexp pgquery sqlexpfile foo bar is absolutely the same as above it just prepends sql and appends sql to your string if you agree to follow naming conventions you are welcome to use sqlexpfile produced by hackage and cabal 3 16 1 0
|