Current section
40 Versions
Jump to
Current section
40 Versions
Compare versions
10
files changed
+994
additions
-482
deletions
| @@ -1,5 +1,5 @@ | |
| 1 1 | name = "parrot" |
| 2 | - version = "2.1.2" |
| 2 | + version = "2.1.3" |
| 3 3 | |
| 4 4 | description = "🦜 type-safe SQL in gleam for sqlite, postgresql & mysql" |
| 5 5 | licences = ["Apache-2.0"] |
| @@ -1,6 +1,6 @@ | |
| 1 1 | {<<"name">>, <<"parrot">>}. |
| 2 2 | {<<"app">>, <<"parrot">>}. |
| 3 | - {<<"version">>, <<"2.1.2">>}. |
| 3 | + {<<"version">>, <<"2.1.3">>}. |
| 4 4 | {<<"description">>, <<"🦜 type-safe SQL in gleam for sqlite, postgresql & mysql"/utf8>>}. |
| 5 5 | {<<"licenses">>, [<<"Apache-2.0">>]}. |
| 6 6 | {<<"build_tools">>, [<<"gleam">>]}. |
| @@ -8,28 +8,18 @@ | |
| 8 8 | {<<"Repository">>, <<"https://github.com/daniellionel01/parrot">>} |
| 9 9 | ]}. |
| 10 10 | {<<"requirements">>, [ |
| 11 | - {<<"simplifile">>, [ |
| 12 | - {<<"app">>, <<"simplifile">>}, |
| 13 | - {<<"optional">>, false}, |
| 14 | - {<<"requirement">>, <<">= 2.2.0 and < 3.0.0">>} |
| 15 | - ]}, |
| 16 | - {<<"repeatedly">>, [ |
| 17 | - {<<"app">>, <<"repeatedly">>}, |
| 18 | - {<<"optional">>, false}, |
| 19 | - {<<"requirement">>, <<">= 2.1.2 and < 3.0.0">>} |
| 20 | - ]}, |
| 21 | - {<<"envoy">>, [ |
| 22 | - {<<"app">>, <<"envoy">>}, |
| 23 | - {<<"optional">>, false}, |
| 24 | - {<<"requirement">>, <<">= 1.0.2 and < 2.0.0">>} |
| 25 | - ]}, |
| 26 11 | {<<"gleam_crypto">>, [ |
| 27 12 | {<<"app">>, <<"gleam_crypto">>}, |
| 28 13 | {<<"optional">>, false}, |
| 29 14 | {<<"requirement">>, <<">= 1.5.1 and < 2.0.0">>} |
| 30 15 | ]}, |
| 31 | - {<<"argv">>, [ |
| 32 | - {<<"app">>, <<"argv">>}, |
| 16 | + {<<"gleam_stdlib">>, [ |
| 17 | + {<<"app">>, <<"gleam_stdlib">>}, |
| 18 | + {<<"optional">>, false}, |
| 19 | + {<<"requirement">>, <<">= 0.34.0 and < 2.0.0">>} |
| 20 | + ]}, |
| 21 | + {<<"envoy">>, [ |
| 22 | + {<<"app">>, <<"envoy">>}, |
| 33 23 | {<<"optional">>, false}, |
| 34 24 | {<<"requirement">>, <<">= 1.0.2 and < 2.0.0">>} |
| 35 25 | ]}, |
| @@ -38,35 +28,45 @@ | |
| 38 28 | {<<"optional">>, false}, |
| 39 29 | {<<"requirement">>, <<">= 1.2.0 and < 2.0.0">>} |
| 40 30 | ]}, |
| 31 | + {<<"argv">>, [ |
| 32 | + {<<"app">>, <<"argv">>}, |
| 33 | + {<<"optional">>, false}, |
| 34 | + {<<"requirement">>, <<">= 1.0.2 and < 2.0.0">>} |
| 35 | + ]}, |
| 41 36 | {<<"gleam_httpc">>, [ |
| 42 37 | {<<"app">>, <<"gleam_httpc">>}, |
| 43 38 | {<<"optional">>, false}, |
| 44 39 | {<<"requirement">>, <<">= 5.0.0 and < 6.0.0">>} |
| 45 40 | ]}, |
| 46 | - {<<"tom">>, [ |
| 47 | - {<<"app">>, <<"tom">>}, |
| 48 | - {<<"optional">>, false}, |
| 49 | - {<<"requirement">>, <<">= 2.0.0 and < 3.0.0">>} |
| 50 | - ]}, |
| 51 41 | {<<"gleam_json">>, [ |
| 52 42 | {<<"app">>, <<"gleam_json">>}, |
| 53 43 | {<<"optional">>, false}, |
| 54 44 | {<<"requirement">>, <<">= 3.0.1 and < 4.0.0">>} |
| 55 45 | ]}, |
| 46 | + {<<"glearray">>, [ |
| 47 | + {<<"app">>, <<"glearray">>}, |
| 48 | + {<<"optional">>, false}, |
| 49 | + {<<"requirement">>, <<">= 2.1.0 and < 3.0.0">>} |
| 50 | + ]}, |
| 51 | + {<<"repeatedly">>, [ |
| 52 | + {<<"app">>, <<"repeatedly">>}, |
| 53 | + {<<"optional">>, false}, |
| 54 | + {<<"requirement">>, <<">= 2.1.2 and < 3.0.0">>} |
| 55 | + ]}, |
| 56 56 | {<<"filepath">>, [ |
| 57 57 | {<<"app">>, <<"filepath">>}, |
| 58 58 | {<<"optional">>, false}, |
| 59 59 | {<<"requirement">>, <<">= 1.1.0 and < 2.0.0">>} |
| 60 60 | ]}, |
| 61 | - {<<"gleam_stdlib">>, [ |
| 62 | - {<<"app">>, <<"gleam_stdlib">>}, |
| 61 | + {<<"simplifile">>, [ |
| 62 | + {<<"app">>, <<"simplifile">>}, |
| 63 63 | {<<"optional">>, false}, |
| 64 | - {<<"requirement">>, <<">= 0.34.0 and < 2.0.0">>} |
| 64 | + {<<"requirement">>, <<">= 2.2.0 and < 3.0.0">>} |
| 65 65 | ]}, |
| 66 | - {<<"glearray">>, [ |
| 67 | - {<<"app">>, <<"glearray">>}, |
| 66 | + {<<"tom">>, [ |
| 67 | + {<<"app">>, <<"tom">>}, |
| 68 68 | {<<"optional">>, false}, |
| 69 | - {<<"requirement">>, <<">= 2.1.0 and < 3.0.0">>} |
| 69 | + {<<"requirement">>, <<">= 2.0.0 and < 3.0.0">>} |
| 70 70 | ]} |
| 71 71 | ]}. |
| 72 72 | {<<"files">>, [ |
| @@ -1,5 +1,5 @@ | |
| 1 1 | {application, parrot, [ |
| 2 | - {vsn, "2.1.2"}, |
| 2 | + {vsn, "2.1.3"}, |
| 3 3 | {applications, [argv, |
| 4 4 | envoy, |
| 5 5 | filepath, |
| @@ -161,12 +161,9 @@ cmd_gen(Engine, Db) -> | |
| 161 161 | Config = {config, |
| 162 162 | Queries_file, |
| 163 163 | <<Project_name/binary, "/sql.gleam"/utf8>>}, |
| 164 | - Gen_result@1 = parrot@internal@codegen:codegen_from_config( |
| 165 | - Config |
| 166 | - ), |
| 167 164 | gleam@result:'try'( |
| 168 | - gleam@result:replace_error(Gen_result@1, codegen_error), |
| 169 | - fun(Gen_result@2) -> |
| 165 | + parrot@internal@codegen:codegen_from_config(Config), |
| 166 | + fun(Gen_result@1) -> |
| 170 167 | parrot@internal@spinner:complete_current( |
| 171 168 | Spinner@3, |
| 172 169 | parrot@internal@spinner:green_checkmark() |
| @@ -201,7 +198,7 @@ cmd_gen(Engine, Db) -> | |
| 201 198 | |
| 202 199 | ) |
| 203 200 | ), |
| 204 | - _pipe@11 = erlang:element(2, Gen_result@2), |
| 201 | + _pipe@11 = erlang:element(2, Gen_result@1), |
| 205 202 | _pipe@12 = gleam@list:unique(_pipe@11), |
| 206 203 | gleam@list:each( |
| 207 204 | _pipe@12, |
| @@ -167,11 +167,7 @@ fn cmd_gen(engine: sqlc.Engine, db: String) -> Result(Nil, errors.ParrotError) { | |
| 167 167 | gleam_module_out_path: project_name <> "/sql.gleam", |
| 168 168 | json_file_path: queries_file, |
| 169 169 | ) |
| 170 | - let gen_result = codegen.codegen_from_config(config) |
| 171 | - use gen_result <- result.try(result.replace_error( |
| 172 | - gen_result, |
| 173 | - errors.CodegenError, |
| 174 | - )) |
| 170 | + use gen_result <- result.try(codegen.codegen_from_config(config)) |
| 175 171 | |
| 176 172 | spinner.complete_current(spinner, spinner.green_checkmark()) |
Loading more files…