* Explode the From GADT. Move runFrom into the ToFrom typeclass removing the need for the intermediate structure. Extract the parts of the Experimental module into submodules. * Reorganize Experimental folder. Move Subquery into core Experimental.From module. * Cleanup hackage documentation. Make sure stylish ran correctly. Update changelog and bump version * Update ERaw to change the direction of NeedParens (parent now tells child context). Removed need for composite key constructor * Get rid of AliasedValue and ValueReference; added sqlExprMetaAlias to SqlExprMeta * Remove EList and EEmptyList; ERaw is now technically possible in each case since it is generalized to all * Remove entity specific constructors from SqlExpr * Remove EOrderBy, EDistinctOn; Change PreprocessedFrom a to just be an independent datatype * Remove EOrderByRandom, calling distinctOnOrderBy with rand will choke the db but you shouldnt be using rand anyway. distinctOnOrderBy seems dangerous though * Remove ESet * Remove EInsert and EInsertFinal * Make postgres tests pass * Change aliased val to be legal value by waiting until expr materialization in select clause before adding AS <alias> * Cleanup ToAliasRefernce; Add isReference meta to value reference even though that info isnt currently used anywhere * Expose Experimental submodules * Update changelog * Create a FromRaw to replace FromSubquery and FromIdent in from clause. Modify Experimental to only use FromRaw. * Convert all of experimental to use new From type instead of From type class. Make the data constructors second class, functions should be used. Introduce *Lateral functions, using the same type for lateral and non lateral queries was probably a mistake. * Expose the new functions and fix the mysql test compilation error (type inference was wonky with `Union` replaced with `union_` * Bump version and add more comments * ValidOnClause was too restrictive, ToFrom is actually the correct amount of leniency. ValidOnClause would not catch use of on for a cross join but would prevent nested joins * Unbreak lateral joins by introducing a completely different ValidOnClause constraint * Fixe error introduced in merge with master * Dont realias alias references * Never realias an already aliased Entity or Value * reindex value references to the latest 'source'
187 lines
6.0 KiB
Plaintext
187 lines
6.0 KiB
Plaintext
cabal-version: 1.12
|
|
|
|
name: esqueleto
|
|
version: 3.5.0.0
|
|
synopsis: Type-safe EDSL for SQL queries on persistent backends.
|
|
description: @esqueleto@ is a bare bones, type-safe EDSL for SQL queries that works with unmodified @persistent@ SQL backends. Its language closely resembles SQL, so you don't have to learn new concepts, just new syntax, and it's fairly easy to predict the generated SQL and optimize it for your backend. Most kinds of errors committed when writing SQL are caught as compile-time errors---although it is possible to write type-checked @esqueleto@ queries that fail at runtime.
|
|
.
|
|
@persistent@ is a library for type-safe data serialization. It has many kinds of backends, such as SQL backends (@persistent-mysql@, @persistent-postgresql@, @persistent-sqlite@) and NoSQL backends (@persistent-mongoDB@). While @persistent@ is a nice library for storing and retrieving records, including with filters, it does not try to support some of the features that are specific to SQL backends. In particular, @esqueleto@ is the recommended library for type-safe @JOIN@s on @persistent@ SQL backends. (The alternative is using raw SQL, but that's error prone and does not offer any composability.)
|
|
.
|
|
Currently, @SELECT@s, @UPDATE@s, @INSERT@s and @DELETE@s are supported. Not all SQL features are available, but most of them can be easily added (especially functions), so please open an issue or send a pull request if you need anything that is not covered by @esqueleto@ on <https://github.com/bitemyapp/esqueleto>.
|
|
.
|
|
The name of this library means \"skeleton\" in Portuguese and contains all three SQL letters in the correct order =). It was inspired by Scala's Squeryl but created from scratch.
|
|
category: Database
|
|
homepage: https://github.com/bitemyapp/esqueleto
|
|
author: Felipe Lessa
|
|
maintainer: cma@bitemyapp.com
|
|
copyright: (c) 2012-2016 Felipe Almeida Lessa
|
|
license: BSD3
|
|
license-file: LICENSE
|
|
build-type: Simple
|
|
extra-source-files:
|
|
README.md
|
|
changelog.md
|
|
|
|
source-repository head
|
|
type: git
|
|
location: git://github.com/bitemyapp/esqueleto.git
|
|
|
|
library
|
|
exposed-modules:
|
|
Database.Esqueleto
|
|
Database.Esqueleto.Experimental
|
|
Database.Esqueleto.Internal.Language
|
|
Database.Esqueleto.Internal.Sql
|
|
Database.Esqueleto.Internal.Internal
|
|
Database.Esqueleto.Internal.ExprParser
|
|
Database.Esqueleto.MySQL
|
|
Database.Esqueleto.PostgreSQL
|
|
Database.Esqueleto.PostgreSQL.JSON
|
|
Database.Esqueleto.SQLite
|
|
Database.Esqueleto.Experimental.From
|
|
Database.Esqueleto.Experimental.From.CommonTableExpression
|
|
Database.Esqueleto.Experimental.From.Join
|
|
Database.Esqueleto.Experimental.From.SqlSetOperation
|
|
Database.Esqueleto.Experimental.ToAlias
|
|
Database.Esqueleto.Experimental.ToAliasReference
|
|
Database.Esqueleto.Experimental.ToMaybe
|
|
other-modules:
|
|
Database.Esqueleto.PostgreSQL.JSON.Instances
|
|
Database.Esqueleto.Internal.PersistentImport
|
|
Paths_esqueleto
|
|
hs-source-dirs:
|
|
src/
|
|
build-depends:
|
|
base >=4.8 && <5.0
|
|
, aeson >=1.0
|
|
, attoparsec >= 0.13 && < 0.15
|
|
, blaze-html
|
|
, bytestring
|
|
, conduit >=1.3
|
|
, containers
|
|
, monad-logger
|
|
, persistent >=2.13 && <3
|
|
, resourcet >=1.2
|
|
, tagged >=0.2
|
|
, text >=0.11 && <1.3
|
|
, time >=1.5.0.1 && <=1.10
|
|
, transformers >=0.2
|
|
, unliftio
|
|
, unordered-containers >=0.2
|
|
ghc-options:
|
|
-Wall
|
|
-Wno-redundant-constraints
|
|
-Wincomplete-uni-patterns
|
|
-Wincomplete-record-updates
|
|
-Wpartial-fields
|
|
-Wmissing-home-modules
|
|
-Widentities
|
|
-Wredundant-constraints
|
|
-Wcpp-undef
|
|
-Wcpp-undef
|
|
-Wmonomorphism-restriction
|
|
default-language: Haskell2010
|
|
|
|
test-suite mysql
|
|
type: exitcode-stdio-1.0
|
|
main-is: MySQL/Test.hs
|
|
other-modules:
|
|
Common.Test
|
|
Paths_esqueleto
|
|
hs-source-dirs:
|
|
test
|
|
ghc-options: -Wall
|
|
build-depends:
|
|
base >=4.8 && <5.0
|
|
, attoparsec
|
|
, blaze-html
|
|
, bytestring
|
|
, conduit >=1.3
|
|
, containers
|
|
, esqueleto
|
|
, exceptions
|
|
, hspec
|
|
, monad-logger
|
|
, mtl
|
|
, mysql
|
|
, mysql-simple
|
|
, persistent
|
|
, persistent-mysql
|
|
, resourcet >=1.2
|
|
, tagged >=0.2
|
|
, text >=0.11 && <1.3
|
|
, time
|
|
, transformers >=0.2
|
|
, unliftio
|
|
, unordered-containers >=0.2
|
|
default-language: Haskell2010
|
|
|
|
test-suite postgresql
|
|
type: exitcode-stdio-1.0
|
|
main-is: PostgreSQL/Test.hs
|
|
other-modules:
|
|
Common.Test
|
|
PostgreSQL.MigrateJSON
|
|
Paths_esqueleto
|
|
hs-source-dirs:
|
|
test
|
|
ghc-options: -Wall -threaded
|
|
build-depends:
|
|
base >=4.8 && <5.0
|
|
, aeson
|
|
, attoparsec
|
|
, blaze-html
|
|
, bytestring
|
|
, conduit >=1.3
|
|
, containers
|
|
, esqueleto
|
|
, exceptions
|
|
, hspec
|
|
, monad-logger
|
|
, mtl
|
|
, persistent
|
|
, persistent-postgresql
|
|
, postgresql-libpq
|
|
, postgresql-simple
|
|
, resourcet >=1.2
|
|
, tagged >=0.2
|
|
, text >=0.11 && <1.3
|
|
, time
|
|
, transformers >=0.2
|
|
, unliftio
|
|
, unordered-containers >=0.2
|
|
, vector
|
|
default-language: Haskell2010
|
|
|
|
test-suite sqlite
|
|
type: exitcode-stdio-1.0
|
|
main-is: SQLite/Test.hs
|
|
other-modules:
|
|
Common.Test
|
|
Paths_esqueleto
|
|
hs-source-dirs:
|
|
test
|
|
ghc-options: -Wall -threaded
|
|
build-depends:
|
|
base >=4.8 && <5.0
|
|
, attoparsec
|
|
, blaze-html
|
|
, bytestring
|
|
, conduit >=1.3
|
|
, containers
|
|
, esqueleto
|
|
, exceptions
|
|
, hspec
|
|
, monad-logger
|
|
, mtl
|
|
, persistent
|
|
, persistent-sqlite
|
|
, resourcet >=1.2
|
|
, tagged >=0.2
|
|
, text >=0.11 && <1.3
|
|
, time
|
|
, transformers >=0.2
|
|
, unliftio
|
|
, unordered-containers >=0.2
|
|
default-language: Haskell2010
|