Skip to content

Commit

Permalink
Fix myAge type in deriveEsqueletoRecord documentation (#369)
Browse files Browse the repository at this point in the history
* Fix `myAge` type in `deriveEsqueletoRecord` documentation

I wrote down the wrong type for some reason, stripping a `Maybe`.

* Bump version 3.5.10.0 -> 3.5.10.1
  • Loading branch information
9999years authored Jul 31, 2023
1 parent 6f884d8 commit b782593
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
3.5.10.1
========
- @9999years
- [#369](https://github.com/bitemyapp/esqueleto/pull/369)
- Fix `myAge` type in `deriveEsqueletoRecord` documentation

3.5.10.0
=======
========
- @ivanbakel
- [#328](https://github.com/bitemyapp/esqueleto/pull/328)
- Add `ToAlias` instances for 9- to 16-tuples
Expand Down
2 changes: 1 addition & 1 deletion esqueleto.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cabal-version: 1.12

name: esqueleto

version: 3.5.10.0
version: 3.5.10.1
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.
.
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Esqueleto/Record.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import Data.Maybe (mapMaybe, fromMaybe, listToMaybe)
-- @
-- data SqlMyRecord =
-- SqlMyRecord { myName :: 'SqlExpr' ('Value' Text)
-- , myAge :: 'SqlExpr' ('Value' Int)
-- , myAge :: 'SqlExpr' ('Value' ('Maybe' Int))
-- , myUser :: 'SqlExpr' ('Entity' User)
-- , myAddress :: 'SqlExpr' ('Maybe' ('Entity' Address))
-- }
Expand All @@ -75,7 +75,7 @@ import Data.Maybe (mapMaybe, fromMaybe, listToMaybe)
-- 'sqlSelectColCount' _ =
-- 'sqlSelectColCount'
-- ('Proxy' \@( ('SqlExpr' ('Value' Text))
-- :& ('SqlExpr' ('Value' Int))
-- :& ('SqlExpr' ('Value' ('Maybe' Int)))
-- :& ('SqlExpr' ('Entity' User))
-- :& ('SqlExpr' ('Maybe' ('Entity' Address)))))
--
Expand All @@ -85,7 +85,7 @@ import Data.Maybe (mapMaybe, fromMaybe, listToMaybe)
-- where
-- process = do
-- 'Value' myName <- 'takeColumns' \@('SqlExpr' ('Value' Text))
-- 'Value' myAge <- 'takeColumns' \@('SqlExpr' ('Value' Int))
-- 'Value' myAge <- 'takeColumns' \@('SqlExpr' ('Value' ('Maybe' Int)))
-- myUser <- 'takeColumns' \@('SqlExpr' ('Entity' User))
-- myAddress <- 'takeColumns' \@('SqlExpr' ('Maybe' ('Entity' Address)))
-- 'pure' MyRecord { myName = myName
Expand Down

0 comments on commit b782593

Please sign in to comment.