packages feed

sqlc-hs (empty) → 0.1.0.0

raw patch · 42 files changed

+9251/−0 lines, 42 filesdep +aesondep +basedep +bytestring

Dependencies added: aeson, base, bytestring, directory, ede, file-embed, filepath, mtl, process, process-extras, proto-lens, proto-lens-runtime, relude, sqlc-hs, tasty, tasty-golden, temporary, text, vector

Files

+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Revision history for sqlc-haskell++## 0.1.0.0 -- YYYY-mm-dd++* First version. Released on an unsuspecting world.
+ LICENSE view
@@ -0,0 +1,202 @@++                                 Apache License+                           Version 2.0, January 2004+                        http://www.apache.org/licenses/++   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++   1. Definitions.++      "License" shall mean the terms and conditions for use, reproduction,+      and distribution as defined by Sections 1 through 9 of this document.++      "Licensor" shall mean the copyright owner or entity authorized by+      the copyright owner that is granting the License.++      "Legal Entity" shall mean the union of the acting entity and all+      other entities that control, are controlled by, or are under common+      control with that entity. For the purposes of this definition,+      "control" means (i) the power, direct or indirect, to cause the+      direction or management of such entity, whether by contract or+      otherwise, or (ii) ownership of fifty percent (50%) or more of the+      outstanding shares, or (iii) beneficial ownership of such entity.++      "You" (or "Your") shall mean an individual or Legal Entity+      exercising permissions granted by this License.++      "Source" form shall mean the preferred form for making modifications,+      including but not limited to software source code, documentation+      source, and configuration files.++      "Object" form shall mean any form resulting from mechanical+      transformation or translation of a Source form, including but+      not limited to compiled object code, generated documentation,+      and conversions to other media types.++      "Work" shall mean the work of authorship, whether in Source or+      Object form, made available under the License, as indicated by a+      copyright notice that is included in or attached to the work+      (an example is provided in the Appendix below).++      "Derivative Works" shall mean any work, whether in Source or Object+      form, that is based on (or derived from) the Work and for which the+      editorial revisions, annotations, elaborations, or other modifications+      represent, as a whole, an original work of authorship. For the purposes+      of this License, Derivative Works shall not include works that remain+      separable from, or merely link (or bind by name) to the interfaces of,+      the Work and Derivative Works thereof.++      "Contribution" shall mean any work of authorship, including+      the original version of the Work and any modifications or additions+      to that Work or Derivative Works thereof, that is intentionally+      submitted to Licensor for inclusion in the Work by the copyright owner+      or by an individual or Legal Entity authorized to submit on behalf of+      the copyright owner. For the purposes of this definition, "submitted"+      means any form of electronic, verbal, or written communication sent+      to the Licensor or its representatives, including but not limited to+      communication on electronic mailing lists, source code control systems,+      and issue tracking systems that are managed by, or on behalf of, the+      Licensor for the purpose of discussing and improving the Work, but+      excluding communication that is conspicuously marked or otherwise+      designated in writing by the copyright owner as "Not a Contribution."++      "Contributor" shall mean Licensor and any individual or Legal Entity+      on behalf of whom a Contribution has been received by Licensor and+      subsequently incorporated within the Work.++   2. Grant of Copyright License. Subject to the terms and conditions of+      this License, each Contributor hereby grants to You a perpetual,+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable+      copyright license to reproduce, prepare Derivative Works of,+      publicly display, publicly perform, sublicense, and distribute the+      Work and such Derivative Works in Source or Object form.++   3. Grant of Patent License. Subject to the terms and conditions of+      this License, each Contributor hereby grants to You a perpetual,+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable+      (except as stated in this section) patent license to make, have made,+      use, offer to sell, sell, import, and otherwise transfer the Work,+      where such license applies only to those patent claims licensable+      by such Contributor that are necessarily infringed by their+      Contribution(s) alone or by combination of their Contribution(s)+      with the Work to which such Contribution(s) was submitted. If You+      institute patent litigation against any entity (including a+      cross-claim or counterclaim in a lawsuit) alleging that the Work+      or a Contribution incorporated within the Work constitutes direct+      or contributory patent infringement, then any patent licenses+      granted to You under this License for that Work shall terminate+      as of the date such litigation is filed.++   4. Redistribution. You may reproduce and distribute copies of the+      Work or Derivative Works thereof in any medium, with or without+      modifications, and in Source or Object form, provided that You+      meet the following conditions:++      (a) You must give any other recipients of the Work or+          Derivative Works a copy of this License; and++      (b) You must cause any modified files to carry prominent notices+          stating that You changed the files; and++      (c) You must retain, in the Source form of any Derivative Works+          that You distribute, all copyright, patent, trademark, and+          attribution notices from the Source form of the Work,+          excluding those notices that do not pertain to any part of+          the Derivative Works; and++      (d) If the Work includes a "NOTICE" text file as part of its+          distribution, then any Derivative Works that You distribute must+          include a readable copy of the attribution notices contained+          within such NOTICE file, excluding those notices that do not+          pertain to any part of the Derivative Works, in at least one+          of the following places: within a NOTICE text file distributed+          as part of the Derivative Works; within the Source form or+          documentation, if provided along with the Derivative Works; or,+          within a display generated by the Derivative Works, if and+          wherever such third-party notices normally appear. The contents+          of the NOTICE file are for informational purposes only and+          do not modify the License. You may add Your own attribution+          notices within Derivative Works that You distribute, alongside+          or as an addendum to the NOTICE text from the Work, provided+          that such additional attribution notices cannot be construed+          as modifying the License.++      You may add Your own copyright statement to Your modifications and+      may provide additional or different license terms and conditions+      for use, reproduction, or distribution of Your modifications, or+      for any such Derivative Works as a whole, provided Your use,+      reproduction, and distribution of the Work otherwise complies with+      the conditions stated in this License.++   5. Submission of Contributions. Unless You explicitly state otherwise,+      any Contribution intentionally submitted for inclusion in the Work+      by You to the Licensor shall be under the terms and conditions of+      this License, without any additional terms or conditions.+      Notwithstanding the above, nothing herein shall supersede or modify+      the terms of any separate license agreement you may have executed+      with Licensor regarding such Contributions.++   6. Trademarks. This License does not grant permission to use the trade+      names, trademarks, service marks, or product names of the Licensor,+      except as required for reasonable and customary use in describing the+      origin of the Work and reproducing the content of the NOTICE file.++   7. Disclaimer of Warranty. Unless required by applicable law or+      agreed to in writing, Licensor provides the Work (and each+      Contributor provides its Contributions) on an "AS IS" BASIS,+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+      implied, including, without limitation, any warranties or conditions+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+      PARTICULAR PURPOSE. You are solely responsible for determining the+      appropriateness of using or redistributing the Work and assume any+      risks associated with Your exercise of permissions under this License.++   8. Limitation of Liability. In no event and under no legal theory,+      whether in tort (including negligence), contract, or otherwise,+      unless required by applicable law (such as deliberate and grossly+      negligent acts) or agreed to in writing, shall any Contributor be+      liable to You for damages, including any direct, indirect, special,+      incidental, or consequential damages of any character arising as a+      result of this License or out of the use or inability to use the+      Work (including but not limited to damages for loss of goodwill,+      work stoppage, computer failure or malfunction, or any and all+      other commercial damages or losses), even if such Contributor+      has been advised of the possibility of such damages.++   9. Accepting Warranty or Additional Liability. While redistributing+      the Work or Derivative Works thereof, You may choose to offer,+      and charge a fee for, acceptance of support, warranty, indemnity,+      or other liability obligations and/or rights consistent with this+      License. However, in accepting such obligations, You may act only+      on Your own behalf and on Your sole responsibility, not on behalf+      of any other Contributor, and only if You agree to indemnify,+      defend, and hold each Contributor harmless for any liability+      incurred by, or claims asserted against, such Contributor by reason+      of your accepting any such warranty or additional liability.++   END OF TERMS AND CONDITIONS++   APPENDIX: How to apply the Apache License to your work.++      To apply the Apache License to your work, attach the following+      boilerplate notice, with the fields enclosed by brackets "[]"+      replaced with your own identifying information. (Don't include+      the brackets!)  The text should be enclosed in the appropriate+      comment syntax for the file format. We also recommend that a+      file or class name and description of purpose be included on the+      same "printed page" as the copyright notice for easier+      identification within third-party archives.++   Copyright [yyyy] [name of copyright owner]++   Licensed under the Apache License, Version 2.0 (the "License");+   you may not use this file except in compliance with the License.+   You may obtain a copy of the License at++       http://www.apache.org/licenses/LICENSE-2.0++   Unless required by applicable law or agreed to in writing, software+   distributed under the License is distributed on an "AS IS" BASIS,+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+   See the License for the specific language governing permissions and+   limitations under the License.
+ app/Main.hs view
@@ -0,0 +1,3 @@+module Main (main) where++import Sqlc.Hs.Main (main)
+ sqlc-hs-prelude/Sqlc/Hs/Prelude.hs view
@@ -0,0 +1,4 @@+module Sqlc.Hs.Prelude (module X) where++import Relude as X+import Relude.Extra.Lens as X
+ sqlc-hs-protos/Proto/Protos/Codegen.hs view
@@ -0,0 +1,5766 @@+{- This file was auto-generated from protos/codegen.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Protos.Codegen (+        CodegenService(..), Catalog(), Codegen(), Codegen'Process(),+        Codegen'WASM(), Column(), CompositeType(), Enum(), File(),+        GenerateRequest(), GenerateResponse(), Identifier(), Parameter(),+        Query(), Schema(), Settings(), Table()+    ) where+import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.comment' @:: Lens' Catalog Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.defaultSchema' @:: Lens' Catalog Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.name' @:: Lens' Catalog Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.schemas' @:: Lens' Catalog [Schema]@+         * 'Proto.Protos.Codegen_Fields.vec'schemas' @:: Lens' Catalog (Data.Vector.Vector Schema)@ -}+data Catalog+  = Catalog'_constructor {_Catalog'comment :: !Data.Text.Text,+                          _Catalog'defaultSchema :: !Data.Text.Text,+                          _Catalog'name :: !Data.Text.Text,+                          _Catalog'schemas :: !(Data.Vector.Vector Schema),+                          _Catalog'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Catalog where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Catalog "comment" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Catalog'comment (\ x__ y__ -> x__ {_Catalog'comment = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Catalog "defaultSchema" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Catalog'defaultSchema+           (\ x__ y__ -> x__ {_Catalog'defaultSchema = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Catalog "name" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Catalog'name (\ x__ y__ -> x__ {_Catalog'name = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Catalog "schemas" [Schema] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Catalog'schemas (\ x__ y__ -> x__ {_Catalog'schemas = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Catalog "vec'schemas" (Data.Vector.Vector Schema) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Catalog'schemas (\ x__ y__ -> x__ {_Catalog'schemas = y__}))+        Prelude.id+instance Data.ProtoLens.Message Catalog where+  messageName _ = Data.Text.pack "plugin.Catalog"+  packedMessageDescriptor _+    = "\n\+      \\aCatalog\DC2\CAN\n\+      \\acomment\CAN\SOH \SOH(\tR\acomment\DC2%\n\+      \\SOdefault_schema\CAN\STX \SOH(\tR\rdefaultSchema\DC2\DC2\n\+      \\EOTname\CAN\ETX \SOH(\tR\EOTname\DC2(\n\+      \\aschemas\CAN\EOT \ETX(\v2\SO.plugin.SchemaR\aschemas"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        comment__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "comment"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"comment")) ::+              Data.ProtoLens.FieldDescriptor Catalog+        defaultSchema__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "default_schema"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"defaultSchema")) ::+              Data.ProtoLens.FieldDescriptor Catalog+        name__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::+              Data.ProtoLens.FieldDescriptor Catalog+        schemas__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "schemas"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Schema)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"schemas")) ::+              Data.ProtoLens.FieldDescriptor Catalog+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, comment__field_descriptor),+           (Data.ProtoLens.Tag 2, defaultSchema__field_descriptor),+           (Data.ProtoLens.Tag 3, name__field_descriptor),+           (Data.ProtoLens.Tag 4, schemas__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Catalog'_unknownFields+        (\ x__ y__ -> x__ {_Catalog'_unknownFields = y__})+  defMessage+    = Catalog'_constructor+        {_Catalog'comment = Data.ProtoLens.fieldDefault,+         _Catalog'defaultSchema = Data.ProtoLens.fieldDefault,+         _Catalog'name = Data.ProtoLens.fieldDefault,+         _Catalog'schemas = Data.Vector.Generic.empty,+         _Catalog'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Catalog+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Schema+             -> Data.ProtoLens.Encoding.Bytes.Parser Catalog+        loop x mutable'schemas+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'schemas <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                          (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                             mutable'schemas)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'schemas") frozen'schemas x))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "comment"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"comment") y x)+                                  mutable'schemas+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "default_schema"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"defaultSchema") y x)+                                  mutable'schemas+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "name"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)+                                  mutable'schemas+                        34+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "schemas"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'schemas y)+                                loop x v+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'schemas+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'schemas <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                   Data.ProtoLens.Encoding.Growing.new+              loop Data.ProtoLens.defMessage mutable'schemas)+          "Catalog"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"comment") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let+                   _v+                     = Lens.Family2.view+                         (Data.ProtoLens.Field.field @"defaultSchema") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8 _v))+                ((Data.Monoid.<>)+                   (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                            ((Prelude..)+                               (\ bs+                                  -> (Data.Monoid.<>)+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt+                                          (Prelude.fromIntegral (Data.ByteString.length bs)))+                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                               Data.Text.Encoding.encodeUtf8 _v))+                   ((Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                         (\ _v+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 34)+                                 ((Prelude..)+                                    (\ bs+                                       -> (Data.Monoid.<>)+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt+                                               (Prelude.fromIntegral (Data.ByteString.length bs)))+                                            (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                    Data.ProtoLens.encodeMessage _v))+                         (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'schemas") _x))+                      (Data.ProtoLens.Encoding.Wire.buildFieldSet+                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))+instance Control.DeepSeq.NFData Catalog where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Catalog'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Catalog'comment x__)+                (Control.DeepSeq.deepseq+                   (_Catalog'defaultSchema x__)+                   (Control.DeepSeq.deepseq+                      (_Catalog'name x__)+                      (Control.DeepSeq.deepseq (_Catalog'schemas x__) ()))))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.out' @:: Lens' Codegen Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.plugin' @:: Lens' Codegen Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.options' @:: Lens' Codegen Data.ByteString.ByteString@+         * 'Proto.Protos.Codegen_Fields.env' @:: Lens' Codegen [Data.Text.Text]@+         * 'Proto.Protos.Codegen_Fields.vec'env' @:: Lens' Codegen (Data.Vector.Vector Data.Text.Text)@+         * 'Proto.Protos.Codegen_Fields.process' @:: Lens' Codegen Codegen'Process@+         * 'Proto.Protos.Codegen_Fields.maybe'process' @:: Lens' Codegen (Prelude.Maybe Codegen'Process)@+         * 'Proto.Protos.Codegen_Fields.wasm' @:: Lens' Codegen Codegen'WASM@+         * 'Proto.Protos.Codegen_Fields.maybe'wasm' @:: Lens' Codegen (Prelude.Maybe Codegen'WASM)@ -}+data Codegen+  = Codegen'_constructor {_Codegen'out :: !Data.Text.Text,+                          _Codegen'plugin :: !Data.Text.Text,+                          _Codegen'options :: !Data.ByteString.ByteString,+                          _Codegen'env :: !(Data.Vector.Vector Data.Text.Text),+                          _Codegen'process :: !(Prelude.Maybe Codegen'Process),+                          _Codegen'wasm :: !(Prelude.Maybe Codegen'WASM),+                          _Codegen'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Codegen where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Codegen "out" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'out (\ x__ y__ -> x__ {_Codegen'out = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Codegen "plugin" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'plugin (\ x__ y__ -> x__ {_Codegen'plugin = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Codegen "options" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'options (\ x__ y__ -> x__ {_Codegen'options = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Codegen "env" [Data.Text.Text] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'env (\ x__ y__ -> x__ {_Codegen'env = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Codegen "vec'env" (Data.Vector.Vector Data.Text.Text) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'env (\ x__ y__ -> x__ {_Codegen'env = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Codegen "process" Codegen'Process where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'process (\ x__ y__ -> x__ {_Codegen'process = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Codegen "maybe'process" (Prelude.Maybe Codegen'Process) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'process (\ x__ y__ -> x__ {_Codegen'process = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Codegen "wasm" Codegen'WASM where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'wasm (\ x__ y__ -> x__ {_Codegen'wasm = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Codegen "maybe'wasm" (Prelude.Maybe Codegen'WASM) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'wasm (\ x__ y__ -> x__ {_Codegen'wasm = y__}))+        Prelude.id+instance Data.ProtoLens.Message Codegen where+  messageName _ = Data.Text.pack "plugin.Codegen"+  packedMessageDescriptor _+    = "\n\+      \\aCodegen\DC2\DLE\n\+      \\ETXout\CAN\SOH \SOH(\tR\ETXout\DC2\SYN\n\+      \\ACKplugin\CAN\STX \SOH(\tR\ACKplugin\DC2\CAN\n\+      \\aoptions\CAN\ETX \SOH(\fR\aoptions\DC2\DLE\n\+      \\ETXenv\CAN\EOT \ETX(\tR\ETXenv\DC21\n\+      \\aprocess\CAN\ENQ \SOH(\v2\ETB.plugin.Codegen.ProcessR\aprocess\DC2(\n\+      \\EOTwasm\CAN\ACK \SOH(\v2\DC4.plugin.Codegen.WASMR\EOTwasm\SUB\ESC\n\+      \\aProcess\DC2\DLE\n\+      \\ETXcmd\CAN\SOH \SOH(\tR\ETXcmd\SUB0\n\+      \\EOTWASM\DC2\DLE\n\+      \\ETXurl\CAN\SOH \SOH(\tR\ETXurl\DC2\SYN\n\+      \\ACKsha256\CAN\STX \SOH(\tR\ACKsha256"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        out__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "out"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"out")) ::+              Data.ProtoLens.FieldDescriptor Codegen+        plugin__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "plugin"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"plugin")) ::+              Data.ProtoLens.FieldDescriptor Codegen+        options__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "options"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"options")) ::+              Data.ProtoLens.FieldDescriptor Codegen+        env__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "env"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"env")) ::+              Data.ProtoLens.FieldDescriptor Codegen+        process__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "process"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Codegen'Process)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'process")) ::+              Data.ProtoLens.FieldDescriptor Codegen+        wasm__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "wasm"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Codegen'WASM)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'wasm")) ::+              Data.ProtoLens.FieldDescriptor Codegen+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, out__field_descriptor),+           (Data.ProtoLens.Tag 2, plugin__field_descriptor),+           (Data.ProtoLens.Tag 3, options__field_descriptor),+           (Data.ProtoLens.Tag 4, env__field_descriptor),+           (Data.ProtoLens.Tag 5, process__field_descriptor),+           (Data.ProtoLens.Tag 6, wasm__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Codegen'_unknownFields+        (\ x__ y__ -> x__ {_Codegen'_unknownFields = y__})+  defMessage+    = Codegen'_constructor+        {_Codegen'out = Data.ProtoLens.fieldDefault,+         _Codegen'plugin = Data.ProtoLens.fieldDefault,+         _Codegen'options = Data.ProtoLens.fieldDefault,+         _Codegen'env = Data.Vector.Generic.empty,+         _Codegen'process = Prelude.Nothing,+         _Codegen'wasm = Prelude.Nothing, _Codegen'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Codegen+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text+             -> Data.ProtoLens.Encoding.Bytes.Parser Codegen+        loop x mutable'env+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'env <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                      (Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'env)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'env") frozen'env x))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "out"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"out") y x)+                                  mutable'env+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "plugin"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"plugin") y x)+                                  mutable'env+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "options"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"options") y x)+                                  mutable'env+                        34+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.getText+                                              (Prelude.fromIntegral len))+                                        "env"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'env y)+                                loop x v+                        42+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "process"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"process") y x)+                                  mutable'env+                        50+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "wasm"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"wasm") y x)+                                  mutable'env+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'env+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'env <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                               Data.ProtoLens.Encoding.Growing.new+              loop Data.ProtoLens.defMessage mutable'env)+          "Codegen"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"out") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"plugin") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8 _v))+                ((Data.Monoid.<>)+                   (let+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"options") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                            ((\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                               _v))+                   ((Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                         (\ _v+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 34)+                                 ((Prelude..)+                                    (\ bs+                                       -> (Data.Monoid.<>)+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt+                                               (Prelude.fromIntegral (Data.ByteString.length bs)))+                                            (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                    Data.Text.Encoding.encodeUtf8 _v))+                         (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'env") _x))+                      ((Data.Monoid.<>)+                         (case+                              Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'process") _x+                          of+                            Prelude.Nothing -> Data.Monoid.mempty+                            (Prelude.Just _v)+                              -> (Data.Monoid.<>)+                                   (Data.ProtoLens.Encoding.Bytes.putVarInt 42)+                                   ((Prelude..)+                                      (\ bs+                                         -> (Data.Monoid.<>)+                                              (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                 (Prelude.fromIntegral (Data.ByteString.length bs)))+                                              (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                      Data.ProtoLens.encodeMessage _v))+                         ((Data.Monoid.<>)+                            (case+                                 Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'wasm") _x+                             of+                               Prelude.Nothing -> Data.Monoid.mempty+                               (Prelude.Just _v)+                                 -> (Data.Monoid.<>)+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt 50)+                                      ((Prelude..)+                                         (\ bs+                                            -> (Data.Monoid.<>)+                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                    (Prelude.fromIntegral+                                                       (Data.ByteString.length bs)))+                                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                         Data.ProtoLens.encodeMessage _v))+                            (Data.ProtoLens.Encoding.Wire.buildFieldSet+                               (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))))+instance Control.DeepSeq.NFData Codegen where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Codegen'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Codegen'out x__)+                (Control.DeepSeq.deepseq+                   (_Codegen'plugin x__)+                   (Control.DeepSeq.deepseq+                      (_Codegen'options x__)+                      (Control.DeepSeq.deepseq+                         (_Codegen'env x__)+                         (Control.DeepSeq.deepseq+                            (_Codegen'process x__)+                            (Control.DeepSeq.deepseq (_Codegen'wasm x__) ()))))))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.cmd' @:: Lens' Codegen'Process Data.Text.Text@ -}+data Codegen'Process+  = Codegen'Process'_constructor {_Codegen'Process'cmd :: !Data.Text.Text,+                                  _Codegen'Process'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Codegen'Process where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Codegen'Process "cmd" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'Process'cmd+           (\ x__ y__ -> x__ {_Codegen'Process'cmd = y__}))+        Prelude.id+instance Data.ProtoLens.Message Codegen'Process where+  messageName _ = Data.Text.pack "plugin.Codegen.Process"+  packedMessageDescriptor _+    = "\n\+      \\aProcess\DC2\DLE\n\+      \\ETXcmd\CAN\SOH \SOH(\tR\ETXcmd"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        cmd__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "cmd"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"cmd")) ::+              Data.ProtoLens.FieldDescriptor Codegen'Process+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, cmd__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Codegen'Process'_unknownFields+        (\ x__ y__ -> x__ {_Codegen'Process'_unknownFields = y__})+  defMessage+    = Codegen'Process'_constructor+        {_Codegen'Process'cmd = Data.ProtoLens.fieldDefault,+         _Codegen'Process'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Codegen'Process+          -> Data.ProtoLens.Encoding.Bytes.Parser Codegen'Process+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "cmd"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"cmd") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Process"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"cmd") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData Codegen'Process where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Codegen'Process'_unknownFields x__)+             (Control.DeepSeq.deepseq (_Codegen'Process'cmd x__) ())+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.url' @:: Lens' Codegen'WASM Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.sha256' @:: Lens' Codegen'WASM Data.Text.Text@ -}+data Codegen'WASM+  = Codegen'WASM'_constructor {_Codegen'WASM'url :: !Data.Text.Text,+                               _Codegen'WASM'sha256 :: !Data.Text.Text,+                               _Codegen'WASM'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Codegen'WASM where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Codegen'WASM "url" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'WASM'url (\ x__ y__ -> x__ {_Codegen'WASM'url = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Codegen'WASM "sha256" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Codegen'WASM'sha256+           (\ x__ y__ -> x__ {_Codegen'WASM'sha256 = y__}))+        Prelude.id+instance Data.ProtoLens.Message Codegen'WASM where+  messageName _ = Data.Text.pack "plugin.Codegen.WASM"+  packedMessageDescriptor _+    = "\n\+      \\EOTWASM\DC2\DLE\n\+      \\ETXurl\CAN\SOH \SOH(\tR\ETXurl\DC2\SYN\n\+      \\ACKsha256\CAN\STX \SOH(\tR\ACKsha256"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        url__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "url"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"url")) ::+              Data.ProtoLens.FieldDescriptor Codegen'WASM+        sha256__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "sha256"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"sha256")) ::+              Data.ProtoLens.FieldDescriptor Codegen'WASM+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, url__field_descriptor),+           (Data.ProtoLens.Tag 2, sha256__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Codegen'WASM'_unknownFields+        (\ x__ y__ -> x__ {_Codegen'WASM'_unknownFields = y__})+  defMessage+    = Codegen'WASM'_constructor+        {_Codegen'WASM'url = Data.ProtoLens.fieldDefault,+         _Codegen'WASM'sha256 = Data.ProtoLens.fieldDefault,+         _Codegen'WASM'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Codegen'WASM -> Data.ProtoLens.Encoding.Bytes.Parser Codegen'WASM+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "url"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"url") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "sha256"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"sha256") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "WASM"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"url") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"sha256") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8 _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData Codegen'WASM where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Codegen'WASM'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Codegen'WASM'url x__)+                (Control.DeepSeq.deepseq (_Codegen'WASM'sha256 x__) ()))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.name' @:: Lens' Column Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.notNull' @:: Lens' Column Prelude.Bool@+         * 'Proto.Protos.Codegen_Fields.isArray' @:: Lens' Column Prelude.Bool@+         * 'Proto.Protos.Codegen_Fields.comment' @:: Lens' Column Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.length' @:: Lens' Column Data.Int.Int32@+         * 'Proto.Protos.Codegen_Fields.isNamedParam' @:: Lens' Column Prelude.Bool@+         * 'Proto.Protos.Codegen_Fields.isFuncCall' @:: Lens' Column Prelude.Bool@+         * 'Proto.Protos.Codegen_Fields.scope' @:: Lens' Column Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.table' @:: Lens' Column Identifier@+         * 'Proto.Protos.Codegen_Fields.maybe'table' @:: Lens' Column (Prelude.Maybe Identifier)@+         * 'Proto.Protos.Codegen_Fields.tableAlias' @:: Lens' Column Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.type'' @:: Lens' Column Identifier@+         * 'Proto.Protos.Codegen_Fields.maybe'type'' @:: Lens' Column (Prelude.Maybe Identifier)@+         * 'Proto.Protos.Codegen_Fields.isSqlcSlice' @:: Lens' Column Prelude.Bool@+         * 'Proto.Protos.Codegen_Fields.embedTable' @:: Lens' Column Identifier@+         * 'Proto.Protos.Codegen_Fields.maybe'embedTable' @:: Lens' Column (Prelude.Maybe Identifier)@+         * 'Proto.Protos.Codegen_Fields.originalName' @:: Lens' Column Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.unsigned' @:: Lens' Column Prelude.Bool@+         * 'Proto.Protos.Codegen_Fields.arrayDims' @:: Lens' Column Data.Int.Int32@ -}+data Column+  = Column'_constructor {_Column'name :: !Data.Text.Text,+                         _Column'notNull :: !Prelude.Bool,+                         _Column'isArray :: !Prelude.Bool,+                         _Column'comment :: !Data.Text.Text,+                         _Column'length :: !Data.Int.Int32,+                         _Column'isNamedParam :: !Prelude.Bool,+                         _Column'isFuncCall :: !Prelude.Bool,+                         _Column'scope :: !Data.Text.Text,+                         _Column'table :: !(Prelude.Maybe Identifier),+                         _Column'tableAlias :: !Data.Text.Text,+                         _Column'type' :: !(Prelude.Maybe Identifier),+                         _Column'isSqlcSlice :: !Prelude.Bool,+                         _Column'embedTable :: !(Prelude.Maybe Identifier),+                         _Column'originalName :: !Data.Text.Text,+                         _Column'unsigned :: !Prelude.Bool,+                         _Column'arrayDims :: !Data.Int.Int32,+                         _Column'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Column where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Column "name" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'name (\ x__ y__ -> x__ {_Column'name = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "notNull" Prelude.Bool where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'notNull (\ x__ y__ -> x__ {_Column'notNull = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "isArray" Prelude.Bool where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'isArray (\ x__ y__ -> x__ {_Column'isArray = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "comment" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'comment (\ x__ y__ -> x__ {_Column'comment = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "length" Data.Int.Int32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'length (\ x__ y__ -> x__ {_Column'length = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "isNamedParam" Prelude.Bool where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'isNamedParam+           (\ x__ y__ -> x__ {_Column'isNamedParam = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "isFuncCall" Prelude.Bool where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'isFuncCall (\ x__ y__ -> x__ {_Column'isFuncCall = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "scope" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'scope (\ x__ y__ -> x__ {_Column'scope = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "table" Identifier where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'table (\ x__ y__ -> x__ {_Column'table = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Column "maybe'table" (Prelude.Maybe Identifier) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'table (\ x__ y__ -> x__ {_Column'table = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "tableAlias" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'tableAlias (\ x__ y__ -> x__ {_Column'tableAlias = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "type'" Identifier where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'type' (\ x__ y__ -> x__ {_Column'type' = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Column "maybe'type'" (Prelude.Maybe Identifier) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'type' (\ x__ y__ -> x__ {_Column'type' = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "isSqlcSlice" Prelude.Bool where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'isSqlcSlice (\ x__ y__ -> x__ {_Column'isSqlcSlice = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "embedTable" Identifier where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'embedTable (\ x__ y__ -> x__ {_Column'embedTable = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Column "maybe'embedTable" (Prelude.Maybe Identifier) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'embedTable (\ x__ y__ -> x__ {_Column'embedTable = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "originalName" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'originalName+           (\ x__ y__ -> x__ {_Column'originalName = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "unsigned" Prelude.Bool where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'unsigned (\ x__ y__ -> x__ {_Column'unsigned = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Column "arrayDims" Data.Int.Int32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Column'arrayDims (\ x__ y__ -> x__ {_Column'arrayDims = y__}))+        Prelude.id+instance Data.ProtoLens.Message Column where+  messageName _ = Data.Text.pack "plugin.Column"+  packedMessageDescriptor _+    = "\n\+      \\ACKColumn\DC2\DC2\n\+      \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2\EM\n\+      \\bnot_null\CAN\ETX \SOH(\bR\anotNull\DC2\EM\n\+      \\bis_array\CAN\EOT \SOH(\bR\aisArray\DC2\CAN\n\+      \\acomment\CAN\ENQ \SOH(\tR\acomment\DC2\SYN\n\+      \\ACKlength\CAN\ACK \SOH(\ENQR\ACKlength\DC2$\n\+      \\SOis_named_param\CAN\a \SOH(\bR\fisNamedParam\DC2 \n\+      \\fis_func_call\CAN\b \SOH(\bR\n\+      \isFuncCall\DC2\DC4\n\+      \\ENQscope\CAN\t \SOH(\tR\ENQscope\DC2(\n\+      \\ENQtable\CAN\n\+      \ \SOH(\v2\DC2.plugin.IdentifierR\ENQtable\DC2\US\n\+      \\vtable_alias\CAN\v \SOH(\tR\n\+      \tableAlias\DC2&\n\+      \\EOTtype\CAN\f \SOH(\v2\DC2.plugin.IdentifierR\EOTtype\DC2\"\n\+      \\ris_sqlc_slice\CAN\r \SOH(\bR\visSqlcSlice\DC23\n\+      \\vembed_table\CAN\SO \SOH(\v2\DC2.plugin.IdentifierR\n\+      \embedTable\DC2#\n\+      \\roriginal_name\CAN\SI \SOH(\tR\foriginalName\DC2\SUB\n\+      \\bunsigned\CAN\DLE \SOH(\bR\bunsigned\DC2\GS\n\+      \\n\+      \array_dims\CAN\DC1 \SOH(\ENQR\tarrayDims"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        name__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::+              Data.ProtoLens.FieldDescriptor Column+        notNull__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "not_null"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"notNull")) ::+              Data.ProtoLens.FieldDescriptor Column+        isArray__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "is_array"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"isArray")) ::+              Data.ProtoLens.FieldDescriptor Column+        comment__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "comment"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"comment")) ::+              Data.ProtoLens.FieldDescriptor Column+        length__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "length"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"length")) ::+              Data.ProtoLens.FieldDescriptor Column+        isNamedParam__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "is_named_param"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"isNamedParam")) ::+              Data.ProtoLens.FieldDescriptor Column+        isFuncCall__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "is_func_call"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"isFuncCall")) ::+              Data.ProtoLens.FieldDescriptor Column+        scope__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "scope"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"scope")) ::+              Data.ProtoLens.FieldDescriptor Column+        table__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "table"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Identifier)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'table")) ::+              Data.ProtoLens.FieldDescriptor Column+        tableAlias__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "table_alias"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"tableAlias")) ::+              Data.ProtoLens.FieldDescriptor Column+        type'__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "type"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Identifier)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'type'")) ::+              Data.ProtoLens.FieldDescriptor Column+        isSqlcSlice__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "is_sqlc_slice"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"isSqlcSlice")) ::+              Data.ProtoLens.FieldDescriptor Column+        embedTable__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "embed_table"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Identifier)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'embedTable")) ::+              Data.ProtoLens.FieldDescriptor Column+        originalName__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "original_name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"originalName")) ::+              Data.ProtoLens.FieldDescriptor Column+        unsigned__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "unsigned"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"unsigned")) ::+              Data.ProtoLens.FieldDescriptor Column+        arrayDims__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "array_dims"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"arrayDims")) ::+              Data.ProtoLens.FieldDescriptor Column+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, name__field_descriptor),+           (Data.ProtoLens.Tag 3, notNull__field_descriptor),+           (Data.ProtoLens.Tag 4, isArray__field_descriptor),+           (Data.ProtoLens.Tag 5, comment__field_descriptor),+           (Data.ProtoLens.Tag 6, length__field_descriptor),+           (Data.ProtoLens.Tag 7, isNamedParam__field_descriptor),+           (Data.ProtoLens.Tag 8, isFuncCall__field_descriptor),+           (Data.ProtoLens.Tag 9, scope__field_descriptor),+           (Data.ProtoLens.Tag 10, table__field_descriptor),+           (Data.ProtoLens.Tag 11, tableAlias__field_descriptor),+           (Data.ProtoLens.Tag 12, type'__field_descriptor),+           (Data.ProtoLens.Tag 13, isSqlcSlice__field_descriptor),+           (Data.ProtoLens.Tag 14, embedTable__field_descriptor),+           (Data.ProtoLens.Tag 15, originalName__field_descriptor),+           (Data.ProtoLens.Tag 16, unsigned__field_descriptor),+           (Data.ProtoLens.Tag 17, arrayDims__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Column'_unknownFields+        (\ x__ y__ -> x__ {_Column'_unknownFields = y__})+  defMessage+    = Column'_constructor+        {_Column'name = Data.ProtoLens.fieldDefault,+         _Column'notNull = Data.ProtoLens.fieldDefault,+         _Column'isArray = Data.ProtoLens.fieldDefault,+         _Column'comment = Data.ProtoLens.fieldDefault,+         _Column'length = Data.ProtoLens.fieldDefault,+         _Column'isNamedParam = Data.ProtoLens.fieldDefault,+         _Column'isFuncCall = Data.ProtoLens.fieldDefault,+         _Column'scope = Data.ProtoLens.fieldDefault,+         _Column'table = Prelude.Nothing,+         _Column'tableAlias = Data.ProtoLens.fieldDefault,+         _Column'type' = Prelude.Nothing,+         _Column'isSqlcSlice = Data.ProtoLens.fieldDefault,+         _Column'embedTable = Prelude.Nothing,+         _Column'originalName = Data.ProtoLens.fieldDefault,+         _Column'unsigned = Data.ProtoLens.fieldDefault,+         _Column'arrayDims = Data.ProtoLens.fieldDefault,+         _Column'_unknownFields = []}+  parseMessage+    = let+        loop :: Column -> Data.ProtoLens.Encoding.Bytes.Parser Column+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "name"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)+                        24+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "not_null"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"notNull") y x)+                        32+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "is_array"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"isArray") y x)+                        42+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "comment"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"comment") y x)+                        48+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "length"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"length") y x)+                        56+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "is_named_param"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"isNamedParam") y x)+                        64+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "is_func_call"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"isFuncCall") y x)+                        74+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "scope"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"scope") y x)+                        82+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "table"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"table") y x)+                        90+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "table_alias"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"tableAlias") y x)+                        98+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "type"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"type'") y x)+                        104+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "is_sqlc_slice"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"isSqlcSlice") y x)+                        114+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "embed_table"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"embedTable") y x)+                        122+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "original_name"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"originalName") y x)+                        128+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "unsigned"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"unsigned") y x)+                        136+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "array_dims"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"arrayDims") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Column"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"notNull") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 24)+                         ((Prelude..)+                            Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)+                            _v))+                ((Data.Monoid.<>)+                   (let+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"isArray") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 32)+                            ((Prelude..)+                               Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)+                               _v))+                   ((Data.Monoid.<>)+                      (let+                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"comment") _x+                       in+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                             Data.Monoid.mempty+                         else+                             (Data.Monoid.<>)+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 42)+                               ((Prelude..)+                                  (\ bs+                                     -> (Data.Monoid.<>)+                                          (Data.ProtoLens.Encoding.Bytes.putVarInt+                                             (Prelude.fromIntegral (Data.ByteString.length bs)))+                                          (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                  Data.Text.Encoding.encodeUtf8 _v))+                      ((Data.Monoid.<>)+                         (let+                            _v = Lens.Family2.view (Data.ProtoLens.Field.field @"length") _x+                          in+                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                Data.Monoid.mempty+                            else+                                (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 48)+                                  ((Prelude..)+                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral+                                     _v))+                         ((Data.Monoid.<>)+                            (let+                               _v+                                 = Lens.Family2.view (Data.ProtoLens.Field.field @"isNamedParam") _x+                             in+                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                   Data.Monoid.mempty+                               else+                                   (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 56)+                                     ((Prelude..)+                                        Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (\ b -> if b then 1 else 0) _v))+                            ((Data.Monoid.<>)+                               (let+                                  _v+                                    = Lens.Family2.view+                                        (Data.ProtoLens.Field.field @"isFuncCall") _x+                                in+                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                      Data.Monoid.mempty+                                  else+                                      (Data.Monoid.<>)+                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 64)+                                        ((Prelude..)+                                           Data.ProtoLens.Encoding.Bytes.putVarInt+                                           (\ b -> if b then 1 else 0) _v))+                               ((Data.Monoid.<>)+                                  (let+                                     _v = Lens.Family2.view (Data.ProtoLens.Field.field @"scope") _x+                                   in+                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                         Data.Monoid.mempty+                                     else+                                         (Data.Monoid.<>)+                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 74)+                                           ((Prelude..)+                                              (\ bs+                                                 -> (Data.Monoid.<>)+                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                         (Prelude.fromIntegral+                                                            (Data.ByteString.length bs)))+                                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                              Data.Text.Encoding.encodeUtf8 _v))+                                  ((Data.Monoid.<>)+                                     (case+                                          Lens.Family2.view+                                            (Data.ProtoLens.Field.field @"maybe'table") _x+                                      of+                                        Prelude.Nothing -> Data.Monoid.mempty+                                        (Prelude.Just _v)+                                          -> (Data.Monoid.<>)+                                               (Data.ProtoLens.Encoding.Bytes.putVarInt 82)+                                               ((Prelude..)+                                                  (\ bs+                                                     -> (Data.Monoid.<>)+                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                             (Prelude.fromIntegral+                                                                (Data.ByteString.length bs)))+                                                          (Data.ProtoLens.Encoding.Bytes.putBytes+                                                             bs))+                                                  Data.ProtoLens.encodeMessage _v))+                                     ((Data.Monoid.<>)+                                        (let+                                           _v+                                             = Lens.Family2.view+                                                 (Data.ProtoLens.Field.field @"tableAlias") _x+                                         in+                                           if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                               Data.Monoid.mempty+                                           else+                                               (Data.Monoid.<>)+                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 90)+                                                 ((Prelude..)+                                                    (\ bs+                                                       -> (Data.Monoid.<>)+                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                               (Prelude.fromIntegral+                                                                  (Data.ByteString.length bs)))+                                                            (Data.ProtoLens.Encoding.Bytes.putBytes+                                                               bs))+                                                    Data.Text.Encoding.encodeUtf8 _v))+                                        ((Data.Monoid.<>)+                                           (case+                                                Lens.Family2.view+                                                  (Data.ProtoLens.Field.field @"maybe'type'") _x+                                            of+                                              Prelude.Nothing -> Data.Monoid.mempty+                                              (Prelude.Just _v)+                                                -> (Data.Monoid.<>)+                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 98)+                                                     ((Prelude..)+                                                        (\ bs+                                                           -> (Data.Monoid.<>)+                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                                   (Prelude.fromIntegral+                                                                      (Data.ByteString.length bs)))+                                                                (Data.ProtoLens.Encoding.Bytes.putBytes+                                                                   bs))+                                                        Data.ProtoLens.encodeMessage _v))+                                           ((Data.Monoid.<>)+                                              (let+                                                 _v+                                                   = Lens.Family2.view+                                                       (Data.ProtoLens.Field.field @"isSqlcSlice")+                                                       _x+                                               in+                                                 if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                                     Data.Monoid.mempty+                                                 else+                                                     (Data.Monoid.<>)+                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt 104)+                                                       ((Prelude..)+                                                          Data.ProtoLens.Encoding.Bytes.putVarInt+                                                          (\ b -> if b then 1 else 0) _v))+                                              ((Data.Monoid.<>)+                                                 (case+                                                      Lens.Family2.view+                                                        (Data.ProtoLens.Field.field+                                                           @"maybe'embedTable")+                                                        _x+                                                  of+                                                    Prelude.Nothing -> Data.Monoid.mempty+                                                    (Prelude.Just _v)+                                                      -> (Data.Monoid.<>)+                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                              114)+                                                           ((Prelude..)+                                                              (\ bs+                                                                 -> (Data.Monoid.<>)+                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                                         (Prelude.fromIntegral+                                                                            (Data.ByteString.length+                                                                               bs)))+                                                                      (Data.ProtoLens.Encoding.Bytes.putBytes+                                                                         bs))+                                                              Data.ProtoLens.encodeMessage _v))+                                                 ((Data.Monoid.<>)+                                                    (let+                                                       _v+                                                         = Lens.Family2.view+                                                             (Data.ProtoLens.Field.field+                                                                @"originalName")+                                                             _x+                                                     in+                                                       if (Prelude.==)+                                                            _v Data.ProtoLens.fieldDefault then+                                                           Data.Monoid.mempty+                                                       else+                                                           (Data.Monoid.<>)+                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                                122)+                                                             ((Prelude..)+                                                                (\ bs+                                                                   -> (Data.Monoid.<>)+                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                                           (Prelude.fromIntegral+                                                                              (Data.ByteString.length+                                                                                 bs)))+                                                                        (Data.ProtoLens.Encoding.Bytes.putBytes+                                                                           bs))+                                                                Data.Text.Encoding.encodeUtf8 _v))+                                                    ((Data.Monoid.<>)+                                                       (let+                                                          _v+                                                            = Lens.Family2.view+                                                                (Data.ProtoLens.Field.field+                                                                   @"unsigned")+                                                                _x+                                                        in+                                                          if (Prelude.==)+                                                               _v Data.ProtoLens.fieldDefault then+                                                              Data.Monoid.mempty+                                                          else+                                                              (Data.Monoid.<>)+                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                                   128)+                                                                ((Prelude..)+                                                                   Data.ProtoLens.Encoding.Bytes.putVarInt+                                                                   (\ b -> if b then 1 else 0) _v))+                                                       ((Data.Monoid.<>)+                                                          (let+                                                             _v+                                                               = Lens.Family2.view+                                                                   (Data.ProtoLens.Field.field+                                                                      @"arrayDims")+                                                                   _x+                                                           in+                                                             if (Prelude.==)+                                                                  _v+                                                                  Data.ProtoLens.fieldDefault then+                                                                 Data.Monoid.mempty+                                                             else+                                                                 (Data.Monoid.<>)+                                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                                      136)+                                                                   ((Prelude..)+                                                                      Data.ProtoLens.Encoding.Bytes.putVarInt+                                                                      Prelude.fromIntegral _v))+                                                          (Data.ProtoLens.Encoding.Wire.buildFieldSet+                                                             (Lens.Family2.view+                                                                Data.ProtoLens.unknownFields+                                                                _x)))))))))))))))))+instance Control.DeepSeq.NFData Column where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Column'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Column'name x__)+                (Control.DeepSeq.deepseq+                   (_Column'notNull x__)+                   (Control.DeepSeq.deepseq+                      (_Column'isArray x__)+                      (Control.DeepSeq.deepseq+                         (_Column'comment x__)+                         (Control.DeepSeq.deepseq+                            (_Column'length x__)+                            (Control.DeepSeq.deepseq+                               (_Column'isNamedParam x__)+                               (Control.DeepSeq.deepseq+                                  (_Column'isFuncCall x__)+                                  (Control.DeepSeq.deepseq+                                     (_Column'scope x__)+                                     (Control.DeepSeq.deepseq+                                        (_Column'table x__)+                                        (Control.DeepSeq.deepseq+                                           (_Column'tableAlias x__)+                                           (Control.DeepSeq.deepseq+                                              (_Column'type' x__)+                                              (Control.DeepSeq.deepseq+                                                 (_Column'isSqlcSlice x__)+                                                 (Control.DeepSeq.deepseq+                                                    (_Column'embedTable x__)+                                                    (Control.DeepSeq.deepseq+                                                       (_Column'originalName x__)+                                                       (Control.DeepSeq.deepseq+                                                          (_Column'unsigned x__)+                                                          (Control.DeepSeq.deepseq+                                                             (_Column'arrayDims x__)+                                                             ()))))))))))))))))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.name' @:: Lens' CompositeType Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.comment' @:: Lens' CompositeType Data.Text.Text@ -}+data CompositeType+  = CompositeType'_constructor {_CompositeType'name :: !Data.Text.Text,+                                _CompositeType'comment :: !Data.Text.Text,+                                _CompositeType'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show CompositeType where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField CompositeType "name" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _CompositeType'name (\ x__ y__ -> x__ {_CompositeType'name = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField CompositeType "comment" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _CompositeType'comment+           (\ x__ y__ -> x__ {_CompositeType'comment = y__}))+        Prelude.id+instance Data.ProtoLens.Message CompositeType where+  messageName _ = Data.Text.pack "plugin.CompositeType"+  packedMessageDescriptor _+    = "\n\+      \\rCompositeType\DC2\DC2\n\+      \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2\CAN\n\+      \\acomment\CAN\STX \SOH(\tR\acomment"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        name__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::+              Data.ProtoLens.FieldDescriptor CompositeType+        comment__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "comment"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"comment")) ::+              Data.ProtoLens.FieldDescriptor CompositeType+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, name__field_descriptor),+           (Data.ProtoLens.Tag 2, comment__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _CompositeType'_unknownFields+        (\ x__ y__ -> x__ {_CompositeType'_unknownFields = y__})+  defMessage+    = CompositeType'_constructor+        {_CompositeType'name = Data.ProtoLens.fieldDefault,+         _CompositeType'comment = Data.ProtoLens.fieldDefault,+         _CompositeType'_unknownFields = []}+  parseMessage+    = let+        loop ::+          CompositeType -> Data.ProtoLens.Encoding.Bytes.Parser CompositeType+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "name"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "comment"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"comment") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "CompositeType"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"comment") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8 _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData CompositeType where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_CompositeType'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_CompositeType'name x__)+                (Control.DeepSeq.deepseq (_CompositeType'comment x__) ()))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.name' @:: Lens' Enum Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.vals' @:: Lens' Enum [Data.Text.Text]@+         * 'Proto.Protos.Codegen_Fields.vec'vals' @:: Lens' Enum (Data.Vector.Vector Data.Text.Text)@+         * 'Proto.Protos.Codegen_Fields.comment' @:: Lens' Enum Data.Text.Text@ -}+data Enum+  = Enum'_constructor {_Enum'name :: !Data.Text.Text,+                       _Enum'vals :: !(Data.Vector.Vector Data.Text.Text),+                       _Enum'comment :: !Data.Text.Text,+                       _Enum'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Enum where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Enum "name" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Enum'name (\ x__ y__ -> x__ {_Enum'name = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Enum "vals" [Data.Text.Text] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Enum'vals (\ x__ y__ -> x__ {_Enum'vals = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Enum "vec'vals" (Data.Vector.Vector Data.Text.Text) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Enum'vals (\ x__ y__ -> x__ {_Enum'vals = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Enum "comment" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Enum'comment (\ x__ y__ -> x__ {_Enum'comment = y__}))+        Prelude.id+instance Data.ProtoLens.Message Enum where+  messageName _ = Data.Text.pack "plugin.Enum"+  packedMessageDescriptor _+    = "\n\+      \\EOTEnum\DC2\DC2\n\+      \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2\DC2\n\+      \\EOTvals\CAN\STX \ETX(\tR\EOTvals\DC2\CAN\n\+      \\acomment\CAN\ETX \SOH(\tR\acomment"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        name__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::+              Data.ProtoLens.FieldDescriptor Enum+        vals__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "vals"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"vals")) ::+              Data.ProtoLens.FieldDescriptor Enum+        comment__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "comment"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"comment")) ::+              Data.ProtoLens.FieldDescriptor Enum+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, name__field_descriptor),+           (Data.ProtoLens.Tag 2, vals__field_descriptor),+           (Data.ProtoLens.Tag 3, comment__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Enum'_unknownFields+        (\ x__ y__ -> x__ {_Enum'_unknownFields = y__})+  defMessage+    = Enum'_constructor+        {_Enum'name = Data.ProtoLens.fieldDefault,+         _Enum'vals = Data.Vector.Generic.empty,+         _Enum'comment = Data.ProtoLens.fieldDefault,+         _Enum'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Enum+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text+             -> Data.ProtoLens.Encoding.Bytes.Parser Enum+        loop x mutable'vals+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'vals <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'vals)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'vals") frozen'vals x))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "name"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)+                                  mutable'vals+                        18+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.getText+                                              (Prelude.fromIntegral len))+                                        "vals"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'vals y)+                                loop x v+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "comment"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"comment") y x)+                                  mutable'vals+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'vals+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'vals <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                Data.ProtoLens.Encoding.Growing.new+              loop Data.ProtoLens.defMessage mutable'vals)+          "Enum"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                   (\ _v+                      -> (Data.Monoid.<>)+                           (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                           ((Prelude..)+                              (\ bs+                                 -> (Data.Monoid.<>)+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt+                                         (Prelude.fromIntegral (Data.ByteString.length bs)))+                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                              Data.Text.Encoding.encodeUtf8 _v))+                   (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'vals") _x))+                ((Data.Monoid.<>)+                   (let+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"comment") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                            ((Prelude..)+                               (\ bs+                                  -> (Data.Monoid.<>)+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt+                                          (Prelude.fromIntegral (Data.ByteString.length bs)))+                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                               Data.Text.Encoding.encodeUtf8 _v))+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))+instance Control.DeepSeq.NFData Enum where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Enum'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Enum'name x__)+                (Control.DeepSeq.deepseq+                   (_Enum'vals x__) (Control.DeepSeq.deepseq (_Enum'comment x__) ())))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.name' @:: Lens' File Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.contents' @:: Lens' File Data.ByteString.ByteString@ -}+data File+  = File'_constructor {_File'name :: !Data.Text.Text,+                       _File'contents :: !Data.ByteString.ByteString,+                       _File'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show File where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField File "name" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _File'name (\ x__ y__ -> x__ {_File'name = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField File "contents" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _File'contents (\ x__ y__ -> x__ {_File'contents = y__}))+        Prelude.id+instance Data.ProtoLens.Message File where+  messageName _ = Data.Text.pack "plugin.File"+  packedMessageDescriptor _+    = "\n\+      \\EOTFile\DC2\DC2\n\+      \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2\SUB\n\+      \\bcontents\CAN\STX \SOH(\fR\bcontents"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        name__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::+              Data.ProtoLens.FieldDescriptor File+        contents__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "contents"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"contents")) ::+              Data.ProtoLens.FieldDescriptor File+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, name__field_descriptor),+           (Data.ProtoLens.Tag 2, contents__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _File'_unknownFields+        (\ x__ y__ -> x__ {_File'_unknownFields = y__})+  defMessage+    = File'_constructor+        {_File'name = Data.ProtoLens.fieldDefault,+         _File'contents = Data.ProtoLens.fieldDefault,+         _File'_unknownFields = []}+  parseMessage+    = let+        loop :: File -> Data.ProtoLens.Encoding.Bytes.Parser File+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "name"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "contents"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"contents") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "File"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"contents") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData File where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_File'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_File'name x__) (Control.DeepSeq.deepseq (_File'contents x__) ()))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.settings' @:: Lens' GenerateRequest Settings@+         * 'Proto.Protos.Codegen_Fields.maybe'settings' @:: Lens' GenerateRequest (Prelude.Maybe Settings)@+         * 'Proto.Protos.Codegen_Fields.catalog' @:: Lens' GenerateRequest Catalog@+         * 'Proto.Protos.Codegen_Fields.maybe'catalog' @:: Lens' GenerateRequest (Prelude.Maybe Catalog)@+         * 'Proto.Protos.Codegen_Fields.queries' @:: Lens' GenerateRequest [Query]@+         * 'Proto.Protos.Codegen_Fields.vec'queries' @:: Lens' GenerateRequest (Data.Vector.Vector Query)@+         * 'Proto.Protos.Codegen_Fields.sqlcVersion' @:: Lens' GenerateRequest Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.pluginOptions' @:: Lens' GenerateRequest Data.ByteString.ByteString@+         * 'Proto.Protos.Codegen_Fields.globalOptions' @:: Lens' GenerateRequest Data.ByteString.ByteString@ -}+data GenerateRequest+  = GenerateRequest'_constructor {_GenerateRequest'settings :: !(Prelude.Maybe Settings),+                                  _GenerateRequest'catalog :: !(Prelude.Maybe Catalog),+                                  _GenerateRequest'queries :: !(Data.Vector.Vector Query),+                                  _GenerateRequest'sqlcVersion :: !Data.Text.Text,+                                  _GenerateRequest'pluginOptions :: !Data.ByteString.ByteString,+                                  _GenerateRequest'globalOptions :: !Data.ByteString.ByteString,+                                  _GenerateRequest'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show GenerateRequest where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField GenerateRequest "settings" Settings where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'settings+           (\ x__ y__ -> x__ {_GenerateRequest'settings = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField GenerateRequest "maybe'settings" (Prelude.Maybe Settings) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'settings+           (\ x__ y__ -> x__ {_GenerateRequest'settings = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField GenerateRequest "catalog" Catalog where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'catalog+           (\ x__ y__ -> x__ {_GenerateRequest'catalog = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField GenerateRequest "maybe'catalog" (Prelude.Maybe Catalog) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'catalog+           (\ x__ y__ -> x__ {_GenerateRequest'catalog = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField GenerateRequest "queries" [Query] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'queries+           (\ x__ y__ -> x__ {_GenerateRequest'queries = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField GenerateRequest "vec'queries" (Data.Vector.Vector Query) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'queries+           (\ x__ y__ -> x__ {_GenerateRequest'queries = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField GenerateRequest "sqlcVersion" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'sqlcVersion+           (\ x__ y__ -> x__ {_GenerateRequest'sqlcVersion = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField GenerateRequest "pluginOptions" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'pluginOptions+           (\ x__ y__ -> x__ {_GenerateRequest'pluginOptions = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField GenerateRequest "globalOptions" Data.ByteString.ByteString where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateRequest'globalOptions+           (\ x__ y__ -> x__ {_GenerateRequest'globalOptions = y__}))+        Prelude.id+instance Data.ProtoLens.Message GenerateRequest where+  messageName _ = Data.Text.pack "plugin.GenerateRequest"+  packedMessageDescriptor _+    = "\n\+      \\SIGenerateRequest\DC2,\n\+      \\bsettings\CAN\SOH \SOH(\v2\DLE.plugin.SettingsR\bsettings\DC2)\n\+      \\acatalog\CAN\STX \SOH(\v2\SI.plugin.CatalogR\acatalog\DC2'\n\+      \\aqueries\CAN\ETX \ETX(\v2\r.plugin.QueryR\aqueries\DC2\"\n\+      \\fsqlc_version\CAN\EOT \SOH(\tR\fsqlc_version\DC2&\n\+      \\SOplugin_options\CAN\ENQ \SOH(\fR\SOplugin_options\DC2&\n\+      \\SOglobal_options\CAN\ACK \SOH(\fR\SOglobal_options"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        settings__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "settings"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Settings)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'settings")) ::+              Data.ProtoLens.FieldDescriptor GenerateRequest+        catalog__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "catalog"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Catalog)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'catalog")) ::+              Data.ProtoLens.FieldDescriptor GenerateRequest+        queries__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "queries"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Query)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"queries")) ::+              Data.ProtoLens.FieldDescriptor GenerateRequest+        sqlcVersion__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "sqlc_version"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"sqlcVersion")) ::+              Data.ProtoLens.FieldDescriptor GenerateRequest+        pluginOptions__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "plugin_options"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"pluginOptions")) ::+              Data.ProtoLens.FieldDescriptor GenerateRequest+        globalOptions__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "global_options"+              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"globalOptions")) ::+              Data.ProtoLens.FieldDescriptor GenerateRequest+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, settings__field_descriptor),+           (Data.ProtoLens.Tag 2, catalog__field_descriptor),+           (Data.ProtoLens.Tag 3, queries__field_descriptor),+           (Data.ProtoLens.Tag 4, sqlcVersion__field_descriptor),+           (Data.ProtoLens.Tag 5, pluginOptions__field_descriptor),+           (Data.ProtoLens.Tag 6, globalOptions__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _GenerateRequest'_unknownFields+        (\ x__ y__ -> x__ {_GenerateRequest'_unknownFields = y__})+  defMessage+    = GenerateRequest'_constructor+        {_GenerateRequest'settings = Prelude.Nothing,+         _GenerateRequest'catalog = Prelude.Nothing,+         _GenerateRequest'queries = Data.Vector.Generic.empty,+         _GenerateRequest'sqlcVersion = Data.ProtoLens.fieldDefault,+         _GenerateRequest'pluginOptions = Data.ProtoLens.fieldDefault,+         _GenerateRequest'globalOptions = Data.ProtoLens.fieldDefault,+         _GenerateRequest'_unknownFields = []}+  parseMessage+    = let+        loop ::+          GenerateRequest+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Query+             -> Data.ProtoLens.Encoding.Bytes.Parser GenerateRequest+        loop x mutable'queries+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'queries <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                          (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                             mutable'queries)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'queries") frozen'queries x))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "settings"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"settings") y x)+                                  mutable'queries+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "catalog"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"catalog") y x)+                                  mutable'queries+                        26+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "queries"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'queries y)+                                loop x v+                        34+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "sqlc_version"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"sqlcVersion") y x)+                                  mutable'queries+                        42+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "plugin_options"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"pluginOptions") y x)+                                  mutable'queries+                        50+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getBytes+                                             (Prelude.fromIntegral len))+                                       "global_options"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"globalOptions") y x)+                                  mutable'queries+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'queries+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'queries <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                   Data.ProtoLens.Encoding.Growing.new+              loop Data.ProtoLens.defMessage mutable'queries)+          "GenerateRequest"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (case+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'settings") _x+              of+                Prelude.Nothing -> Data.Monoid.mempty+                (Prelude.Just _v)+                  -> (Data.Monoid.<>)+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                       ((Prelude..)+                          (\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                          Data.ProtoLens.encodeMessage _v))+             ((Data.Monoid.<>)+                (case+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'catalog") _x+                 of+                   Prelude.Nothing -> Data.Monoid.mempty+                   (Prelude.Just _v)+                     -> (Data.Monoid.<>)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                          ((Prelude..)+                             (\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                             Data.ProtoLens.encodeMessage _v))+                ((Data.Monoid.<>)+                   (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                      (\ _v+                         -> (Data.Monoid.<>)+                              (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                              ((Prelude..)+                                 (\ bs+                                    -> (Data.Monoid.<>)+                                         (Data.ProtoLens.Encoding.Bytes.putVarInt+                                            (Prelude.fromIntegral (Data.ByteString.length bs)))+                                         (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                 Data.ProtoLens.encodeMessage _v))+                      (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'queries") _x))+                   ((Data.Monoid.<>)+                      (let+                         _v+                           = Lens.Family2.view (Data.ProtoLens.Field.field @"sqlcVersion") _x+                       in+                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                             Data.Monoid.mempty+                         else+                             (Data.Monoid.<>)+                               (Data.ProtoLens.Encoding.Bytes.putVarInt 34)+                               ((Prelude..)+                                  (\ bs+                                     -> (Data.Monoid.<>)+                                          (Data.ProtoLens.Encoding.Bytes.putVarInt+                                             (Prelude.fromIntegral (Data.ByteString.length bs)))+                                          (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                  Data.Text.Encoding.encodeUtf8 _v))+                      ((Data.Monoid.<>)+                         (let+                            _v+                              = Lens.Family2.view+                                  (Data.ProtoLens.Field.field @"pluginOptions") _x+                          in+                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                Data.Monoid.mempty+                            else+                                (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 42)+                                  ((\ bs+                                      -> (Data.Monoid.<>)+                                           (Data.ProtoLens.Encoding.Bytes.putVarInt+                                              (Prelude.fromIntegral (Data.ByteString.length bs)))+                                           (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                     _v))+                         ((Data.Monoid.<>)+                            (let+                               _v+                                 = Lens.Family2.view+                                     (Data.ProtoLens.Field.field @"globalOptions") _x+                             in+                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                   Data.Monoid.mempty+                               else+                                   (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 50)+                                     ((\ bs+                                         -> (Data.Monoid.<>)+                                              (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                 (Prelude.fromIntegral (Data.ByteString.length bs)))+                                              (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                        _v))+                            (Data.ProtoLens.Encoding.Wire.buildFieldSet+                               (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))))+instance Control.DeepSeq.NFData GenerateRequest where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_GenerateRequest'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_GenerateRequest'settings x__)+                (Control.DeepSeq.deepseq+                   (_GenerateRequest'catalog x__)+                   (Control.DeepSeq.deepseq+                      (_GenerateRequest'queries x__)+                      (Control.DeepSeq.deepseq+                         (_GenerateRequest'sqlcVersion x__)+                         (Control.DeepSeq.deepseq+                            (_GenerateRequest'pluginOptions x__)+                            (Control.DeepSeq.deepseq+                               (_GenerateRequest'globalOptions x__) ()))))))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.files' @:: Lens' GenerateResponse [File]@+         * 'Proto.Protos.Codegen_Fields.vec'files' @:: Lens' GenerateResponse (Data.Vector.Vector File)@ -}+data GenerateResponse+  = GenerateResponse'_constructor {_GenerateResponse'files :: !(Data.Vector.Vector File),+                                   _GenerateResponse'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show GenerateResponse where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField GenerateResponse "files" [File] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateResponse'files+           (\ x__ y__ -> x__ {_GenerateResponse'files = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField GenerateResponse "vec'files" (Data.Vector.Vector File) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _GenerateResponse'files+           (\ x__ y__ -> x__ {_GenerateResponse'files = y__}))+        Prelude.id+instance Data.ProtoLens.Message GenerateResponse where+  messageName _ = Data.Text.pack "plugin.GenerateResponse"+  packedMessageDescriptor _+    = "\n\+      \\DLEGenerateResponse\DC2\"\n\+      \\ENQfiles\CAN\SOH \ETX(\v2\f.plugin.FileR\ENQfiles"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        files__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "files"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor File)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"files")) ::+              Data.ProtoLens.FieldDescriptor GenerateResponse+      in+        Data.Map.fromList [(Data.ProtoLens.Tag 1, files__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _GenerateResponse'_unknownFields+        (\ x__ y__ -> x__ {_GenerateResponse'_unknownFields = y__})+  defMessage+    = GenerateResponse'_constructor+        {_GenerateResponse'files = Data.Vector.Generic.empty,+         _GenerateResponse'_unknownFields = []}+  parseMessage+    = let+        loop ::+          GenerateResponse+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld File+             -> Data.ProtoLens.Encoding.Bytes.Parser GenerateResponse+        loop x mutable'files+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'files <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                        (Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'files)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'files") frozen'files x))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "files"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'files y)+                                loop x v+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'files+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'files <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                 Data.ProtoLens.Encoding.Growing.new+              loop Data.ProtoLens.defMessage mutable'files)+          "GenerateResponse"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                (\ _v+                   -> (Data.Monoid.<>)+                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                        ((Prelude..)+                           (\ bs+                              -> (Data.Monoid.<>)+                                   (Data.ProtoLens.Encoding.Bytes.putVarInt+                                      (Prelude.fromIntegral (Data.ByteString.length bs)))+                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                           Data.ProtoLens.encodeMessage _v))+                (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'files") _x))+             (Data.ProtoLens.Encoding.Wire.buildFieldSet+                (Lens.Family2.view Data.ProtoLens.unknownFields _x))+instance Control.DeepSeq.NFData GenerateResponse where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_GenerateResponse'_unknownFields x__)+             (Control.DeepSeq.deepseq (_GenerateResponse'files x__) ())+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.catalog' @:: Lens' Identifier Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.schema' @:: Lens' Identifier Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.name' @:: Lens' Identifier Data.Text.Text@ -}+data Identifier+  = Identifier'_constructor {_Identifier'catalog :: !Data.Text.Text,+                             _Identifier'schema :: !Data.Text.Text,+                             _Identifier'name :: !Data.Text.Text,+                             _Identifier'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Identifier where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Identifier "catalog" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Identifier'catalog (\ x__ y__ -> x__ {_Identifier'catalog = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Identifier "schema" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Identifier'schema (\ x__ y__ -> x__ {_Identifier'schema = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Identifier "name" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Identifier'name (\ x__ y__ -> x__ {_Identifier'name = y__}))+        Prelude.id+instance Data.ProtoLens.Message Identifier where+  messageName _ = Data.Text.pack "plugin.Identifier"+  packedMessageDescriptor _+    = "\n\+      \\n\+      \Identifier\DC2\CAN\n\+      \\acatalog\CAN\SOH \SOH(\tR\acatalog\DC2\SYN\n\+      \\ACKschema\CAN\STX \SOH(\tR\ACKschema\DC2\DC2\n\+      \\EOTname\CAN\ETX \SOH(\tR\EOTname"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        catalog__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "catalog"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"catalog")) ::+              Data.ProtoLens.FieldDescriptor Identifier+        schema__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "schema"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"schema")) ::+              Data.ProtoLens.FieldDescriptor Identifier+        name__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::+              Data.ProtoLens.FieldDescriptor Identifier+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, catalog__field_descriptor),+           (Data.ProtoLens.Tag 2, schema__field_descriptor),+           (Data.ProtoLens.Tag 3, name__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Identifier'_unknownFields+        (\ x__ y__ -> x__ {_Identifier'_unknownFields = y__})+  defMessage+    = Identifier'_constructor+        {_Identifier'catalog = Data.ProtoLens.fieldDefault,+         _Identifier'schema = Data.ProtoLens.fieldDefault,+         _Identifier'name = Data.ProtoLens.fieldDefault,+         _Identifier'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Identifier -> Data.ProtoLens.Encoding.Bytes.Parser Identifier+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "catalog"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"catalog") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "schema"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"schema") y x)+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "name"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Identifier"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"catalog") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"schema") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8 _v))+                ((Data.Monoid.<>)+                   (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                            ((Prelude..)+                               (\ bs+                                  -> (Data.Monoid.<>)+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt+                                          (Prelude.fromIntegral (Data.ByteString.length bs)))+                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                               Data.Text.Encoding.encodeUtf8 _v))+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))+instance Control.DeepSeq.NFData Identifier where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Identifier'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Identifier'catalog x__)+                (Control.DeepSeq.deepseq+                   (_Identifier'schema x__)+                   (Control.DeepSeq.deepseq (_Identifier'name x__) ())))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.number' @:: Lens' Parameter Data.Int.Int32@+         * 'Proto.Protos.Codegen_Fields.column' @:: Lens' Parameter Column@+         * 'Proto.Protos.Codegen_Fields.maybe'column' @:: Lens' Parameter (Prelude.Maybe Column)@ -}+data Parameter+  = Parameter'_constructor {_Parameter'number :: !Data.Int.Int32,+                            _Parameter'column :: !(Prelude.Maybe Column),+                            _Parameter'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Parameter where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Parameter "number" Data.Int.Int32 where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Parameter'number (\ x__ y__ -> x__ {_Parameter'number = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Parameter "column" Column where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Parameter'column (\ x__ y__ -> x__ {_Parameter'column = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Parameter "maybe'column" (Prelude.Maybe Column) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Parameter'column (\ x__ y__ -> x__ {_Parameter'column = y__}))+        Prelude.id+instance Data.ProtoLens.Message Parameter where+  messageName _ = Data.Text.pack "plugin.Parameter"+  packedMessageDescriptor _+    = "\n\+      \\tParameter\DC2\SYN\n\+      \\ACKnumber\CAN\SOH \SOH(\ENQR\ACKnumber\DC2&\n\+      \\ACKcolumn\CAN\STX \SOH(\v2\SO.plugin.ColumnR\ACKcolumn"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        number__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "number"+              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"number")) ::+              Data.ProtoLens.FieldDescriptor Parameter+        column__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "column"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Column)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'column")) ::+              Data.ProtoLens.FieldDescriptor Parameter+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, number__field_descriptor),+           (Data.ProtoLens.Tag 2, column__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Parameter'_unknownFields+        (\ x__ y__ -> x__ {_Parameter'_unknownFields = y__})+  defMessage+    = Parameter'_constructor+        {_Parameter'number = Data.ProtoLens.fieldDefault,+         _Parameter'column = Prelude.Nothing,+         _Parameter'_unknownFields = []}+  parseMessage+    = let+        loop :: Parameter -> Data.ProtoLens.Encoding.Bytes.Parser Parameter+        loop x+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (Prelude.fmap+                                          Prelude.fromIntegral+                                          Data.ProtoLens.Encoding.Bytes.getVarInt)+                                       "number"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"number") y x)+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "column"+                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"column") y x)+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do loop Data.ProtoLens.defMessage) "Parameter"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"number") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)+                      ((Prelude..)+                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))+             ((Data.Monoid.<>)+                (case+                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'column") _x+                 of+                   Prelude.Nothing -> Data.Monoid.mempty+                   (Prelude.Just _v)+                     -> (Data.Monoid.<>)+                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                          ((Prelude..)+                             (\ bs+                                -> (Data.Monoid.<>)+                                     (Data.ProtoLens.Encoding.Bytes.putVarInt+                                        (Prelude.fromIntegral (Data.ByteString.length bs)))+                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                             Data.ProtoLens.encodeMessage _v))+                (Data.ProtoLens.Encoding.Wire.buildFieldSet+                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))+instance Control.DeepSeq.NFData Parameter where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Parameter'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Parameter'number x__)+                (Control.DeepSeq.deepseq (_Parameter'column x__) ()))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.text' @:: Lens' Query Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.name' @:: Lens' Query Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.cmd' @:: Lens' Query Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.columns' @:: Lens' Query [Column]@+         * 'Proto.Protos.Codegen_Fields.vec'columns' @:: Lens' Query (Data.Vector.Vector Column)@+         * 'Proto.Protos.Codegen_Fields.params' @:: Lens' Query [Parameter]@+         * 'Proto.Protos.Codegen_Fields.vec'params' @:: Lens' Query (Data.Vector.Vector Parameter)@+         * 'Proto.Protos.Codegen_Fields.comments' @:: Lens' Query [Data.Text.Text]@+         * 'Proto.Protos.Codegen_Fields.vec'comments' @:: Lens' Query (Data.Vector.Vector Data.Text.Text)@+         * 'Proto.Protos.Codegen_Fields.filename' @:: Lens' Query Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.insertIntoTable' @:: Lens' Query Identifier@+         * 'Proto.Protos.Codegen_Fields.maybe'insertIntoTable' @:: Lens' Query (Prelude.Maybe Identifier)@ -}+data Query+  = Query'_constructor {_Query'text :: !Data.Text.Text,+                        _Query'name :: !Data.Text.Text,+                        _Query'cmd :: !Data.Text.Text,+                        _Query'columns :: !(Data.Vector.Vector Column),+                        _Query'params :: !(Data.Vector.Vector Parameter),+                        _Query'comments :: !(Data.Vector.Vector Data.Text.Text),+                        _Query'filename :: !Data.Text.Text,+                        _Query'insertIntoTable :: !(Prelude.Maybe Identifier),+                        _Query'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Query where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Query "text" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'text (\ x__ y__ -> x__ {_Query'text = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Query "name" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'name (\ x__ y__ -> x__ {_Query'name = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Query "cmd" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'cmd (\ x__ y__ -> x__ {_Query'cmd = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Query "columns" [Column] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'columns (\ x__ y__ -> x__ {_Query'columns = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Query "vec'columns" (Data.Vector.Vector Column) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'columns (\ x__ y__ -> x__ {_Query'columns = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Query "params" [Parameter] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'params (\ x__ y__ -> x__ {_Query'params = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Query "vec'params" (Data.Vector.Vector Parameter) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'params (\ x__ y__ -> x__ {_Query'params = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Query "comments" [Data.Text.Text] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'comments (\ x__ y__ -> x__ {_Query'comments = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Query "vec'comments" (Data.Vector.Vector Data.Text.Text) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'comments (\ x__ y__ -> x__ {_Query'comments = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Query "filename" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'filename (\ x__ y__ -> x__ {_Query'filename = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Query "insertIntoTable" Identifier where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'insertIntoTable+           (\ x__ y__ -> x__ {_Query'insertIntoTable = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Query "maybe'insertIntoTable" (Prelude.Maybe Identifier) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Query'insertIntoTable+           (\ x__ y__ -> x__ {_Query'insertIntoTable = y__}))+        Prelude.id+instance Data.ProtoLens.Message Query where+  messageName _ = Data.Text.pack "plugin.Query"+  packedMessageDescriptor _+    = "\n\+      \\ENQQuery\DC2\DC2\n\+      \\EOTtext\CAN\SOH \SOH(\tR\EOTtext\DC2\DC2\n\+      \\EOTname\CAN\STX \SOH(\tR\EOTname\DC2\DLE\n\+      \\ETXcmd\CAN\ETX \SOH(\tR\ETXcmd\DC2(\n\+      \\acolumns\CAN\EOT \ETX(\v2\SO.plugin.ColumnR\acolumns\DC2-\n\+      \\ACKparams\CAN\ENQ \ETX(\v2\DC1.plugin.ParameterR\n\+      \parameters\DC2\SUB\n\+      \\bcomments\CAN\ACK \ETX(\tR\bcomments\DC2\SUB\n\+      \\bfilename\CAN\a \SOH(\tR\bfilename\DC2@\n\+      \\DC1insert_into_table\CAN\b \SOH(\v2\DC2.plugin.IdentifierR\DC1insert_into_table"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        text__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "text"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"text")) ::+              Data.ProtoLens.FieldDescriptor Query+        name__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::+              Data.ProtoLens.FieldDescriptor Query+        cmd__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "cmd"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"cmd")) ::+              Data.ProtoLens.FieldDescriptor Query+        columns__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "columns"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Column)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"columns")) ::+              Data.ProtoLens.FieldDescriptor Query+        params__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "params"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Parameter)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"params")) ::+              Data.ProtoLens.FieldDescriptor Query+        comments__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "comments"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked+                 (Data.ProtoLens.Field.field @"comments")) ::+              Data.ProtoLens.FieldDescriptor Query+        filename__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "filename"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional+                 (Data.ProtoLens.Field.field @"filename")) ::+              Data.ProtoLens.FieldDescriptor Query+        insertIntoTable__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "insert_into_table"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Identifier)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'insertIntoTable")) ::+              Data.ProtoLens.FieldDescriptor Query+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, text__field_descriptor),+           (Data.ProtoLens.Tag 2, name__field_descriptor),+           (Data.ProtoLens.Tag 3, cmd__field_descriptor),+           (Data.ProtoLens.Tag 4, columns__field_descriptor),+           (Data.ProtoLens.Tag 5, params__field_descriptor),+           (Data.ProtoLens.Tag 6, comments__field_descriptor),+           (Data.ProtoLens.Tag 7, filename__field_descriptor),+           (Data.ProtoLens.Tag 8, insertIntoTable__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Query'_unknownFields+        (\ x__ y__ -> x__ {_Query'_unknownFields = y__})+  defMessage+    = Query'_constructor+        {_Query'text = Data.ProtoLens.fieldDefault,+         _Query'name = Data.ProtoLens.fieldDefault,+         _Query'cmd = Data.ProtoLens.fieldDefault,+         _Query'columns = Data.Vector.Generic.empty,+         _Query'params = Data.Vector.Generic.empty,+         _Query'comments = Data.Vector.Generic.empty,+         _Query'filename = Data.ProtoLens.fieldDefault,+         _Query'insertIntoTable = Prelude.Nothing,+         _Query'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Query+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Column+             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text+                -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Parameter+                   -> Data.ProtoLens.Encoding.Bytes.Parser Query+        loop x mutable'columns mutable'comments mutable'params+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'columns <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                          (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                             mutable'columns)+                      frozen'comments <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                           (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                              mutable'comments)+                      frozen'params <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                         (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                            mutable'params)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'columns") frozen'columns+                              (Lens.Family2.set+                                 (Data.ProtoLens.Field.field @"vec'comments") frozen'comments+                                 (Lens.Family2.set+                                    (Data.ProtoLens.Field.field @"vec'params") frozen'params x))))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "text"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"text") y x)+                                  mutable'columns mutable'comments mutable'params+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "name"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)+                                  mutable'columns mutable'comments mutable'params+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "cmd"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"cmd") y x)+                                  mutable'columns mutable'comments mutable'params+                        34+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "columns"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'columns y)+                                loop x v mutable'comments mutable'params+                        42+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "params"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'params y)+                                loop x mutable'columns mutable'comments v+                        50+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.getText+                                              (Prelude.fromIntegral len))+                                        "comments"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'comments y)+                                loop x mutable'columns v mutable'params+                        58+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "filename"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"filename") y x)+                                  mutable'columns mutable'comments mutable'params+                        66+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "insert_into_table"+                                loop+                                  (Lens.Family2.set+                                     (Data.ProtoLens.Field.field @"insertIntoTable") y x)+                                  mutable'columns mutable'comments mutable'params+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'columns mutable'comments mutable'params+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'columns <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                   Data.ProtoLens.Encoding.Growing.new+              mutable'comments <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                    Data.ProtoLens.Encoding.Growing.new+              mutable'params <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                  Data.ProtoLens.Encoding.Growing.new+              loop+                Data.ProtoLens.defMessage mutable'columns mutable'comments+                mutable'params)+          "Query"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"text") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8 _v))+                ((Data.Monoid.<>)+                   (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"cmd") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                            ((Prelude..)+                               (\ bs+                                  -> (Data.Monoid.<>)+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt+                                          (Prelude.fromIntegral (Data.ByteString.length bs)))+                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                               Data.Text.Encoding.encodeUtf8 _v))+                   ((Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                         (\ _v+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 34)+                                 ((Prelude..)+                                    (\ bs+                                       -> (Data.Monoid.<>)+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt+                                               (Prelude.fromIntegral (Data.ByteString.length bs)))+                                            (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                    Data.ProtoLens.encodeMessage _v))+                         (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'columns") _x))+                      ((Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                            (\ _v+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 42)+                                    ((Prelude..)+                                       (\ bs+                                          -> (Data.Monoid.<>)+                                               (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                  (Prelude.fromIntegral+                                                     (Data.ByteString.length bs)))+                                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                       Data.ProtoLens.encodeMessage _v))+                            (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'params") _x))+                         ((Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                               (\ _v+                                  -> (Data.Monoid.<>)+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt 50)+                                       ((Prelude..)+                                          (\ bs+                                             -> (Data.Monoid.<>)+                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                     (Prelude.fromIntegral+                                                        (Data.ByteString.length bs)))+                                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                          Data.Text.Encoding.encodeUtf8 _v))+                               (Lens.Family2.view+                                  (Data.ProtoLens.Field.field @"vec'comments") _x))+                            ((Data.Monoid.<>)+                               (let+                                  _v = Lens.Family2.view (Data.ProtoLens.Field.field @"filename") _x+                                in+                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                                      Data.Monoid.mempty+                                  else+                                      (Data.Monoid.<>)+                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 58)+                                        ((Prelude..)+                                           (\ bs+                                              -> (Data.Monoid.<>)+                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                      (Prelude.fromIntegral+                                                         (Data.ByteString.length bs)))+                                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                           Data.Text.Encoding.encodeUtf8 _v))+                               ((Data.Monoid.<>)+                                  (case+                                       Lens.Family2.view+                                         (Data.ProtoLens.Field.field @"maybe'insertIntoTable") _x+                                   of+                                     Prelude.Nothing -> Data.Monoid.mempty+                                     (Prelude.Just _v)+                                       -> (Data.Monoid.<>)+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt 66)+                                            ((Prelude..)+                                               (\ bs+                                                  -> (Data.Monoid.<>)+                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                          (Prelude.fromIntegral+                                                             (Data.ByteString.length bs)))+                                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                               Data.ProtoLens.encodeMessage _v))+                                  (Data.ProtoLens.Encoding.Wire.buildFieldSet+                                     (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))))))+instance Control.DeepSeq.NFData Query where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Query'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Query'text x__)+                (Control.DeepSeq.deepseq+                   (_Query'name x__)+                   (Control.DeepSeq.deepseq+                      (_Query'cmd x__)+                      (Control.DeepSeq.deepseq+                         (_Query'columns x__)+                         (Control.DeepSeq.deepseq+                            (_Query'params x__)+                            (Control.DeepSeq.deepseq+                               (_Query'comments x__)+                               (Control.DeepSeq.deepseq+                                  (_Query'filename x__)+                                  (Control.DeepSeq.deepseq (_Query'insertIntoTable x__) ()))))))))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.comment' @:: Lens' Schema Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.name' @:: Lens' Schema Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.tables' @:: Lens' Schema [Table]@+         * 'Proto.Protos.Codegen_Fields.vec'tables' @:: Lens' Schema (Data.Vector.Vector Table)@+         * 'Proto.Protos.Codegen_Fields.enums' @:: Lens' Schema [Enum]@+         * 'Proto.Protos.Codegen_Fields.vec'enums' @:: Lens' Schema (Data.Vector.Vector Enum)@+         * 'Proto.Protos.Codegen_Fields.compositeTypes' @:: Lens' Schema [CompositeType]@+         * 'Proto.Protos.Codegen_Fields.vec'compositeTypes' @:: Lens' Schema (Data.Vector.Vector CompositeType)@ -}+data Schema+  = Schema'_constructor {_Schema'comment :: !Data.Text.Text,+                         _Schema'name :: !Data.Text.Text,+                         _Schema'tables :: !(Data.Vector.Vector Table),+                         _Schema'enums :: !(Data.Vector.Vector Enum),+                         _Schema'compositeTypes :: !(Data.Vector.Vector CompositeType),+                         _Schema'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Schema where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Schema "comment" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Schema'comment (\ x__ y__ -> x__ {_Schema'comment = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Schema "name" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Schema'name (\ x__ y__ -> x__ {_Schema'name = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Schema "tables" [Table] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Schema'tables (\ x__ y__ -> x__ {_Schema'tables = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Schema "vec'tables" (Data.Vector.Vector Table) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Schema'tables (\ x__ y__ -> x__ {_Schema'tables = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Schema "enums" [Enum] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Schema'enums (\ x__ y__ -> x__ {_Schema'enums = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Schema "vec'enums" (Data.Vector.Vector Enum) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Schema'enums (\ x__ y__ -> x__ {_Schema'enums = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Schema "compositeTypes" [CompositeType] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Schema'compositeTypes+           (\ x__ y__ -> x__ {_Schema'compositeTypes = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Schema "vec'compositeTypes" (Data.Vector.Vector CompositeType) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Schema'compositeTypes+           (\ x__ y__ -> x__ {_Schema'compositeTypes = y__}))+        Prelude.id+instance Data.ProtoLens.Message Schema where+  messageName _ = Data.Text.pack "plugin.Schema"+  packedMessageDescriptor _+    = "\n\+      \\ACKSchema\DC2\CAN\n\+      \\acomment\CAN\SOH \SOH(\tR\acomment\DC2\DC2\n\+      \\EOTname\CAN\STX \SOH(\tR\EOTname\DC2%\n\+      \\ACKtables\CAN\ETX \ETX(\v2\r.plugin.TableR\ACKtables\DC2\"\n\+      \\ENQenums\CAN\EOT \ETX(\v2\f.plugin.EnumR\ENQenums\DC2>\n\+      \\SIcomposite_types\CAN\ENQ \ETX(\v2\NAK.plugin.CompositeTypeR\SOcompositeTypes"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        comment__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "comment"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"comment")) ::+              Data.ProtoLens.FieldDescriptor Schema+        name__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "name"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"name")) ::+              Data.ProtoLens.FieldDescriptor Schema+        tables__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "tables"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Table)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"tables")) ::+              Data.ProtoLens.FieldDescriptor Schema+        enums__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "enums"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Enum)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"enums")) ::+              Data.ProtoLens.FieldDescriptor Schema+        compositeTypes__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "composite_types"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor CompositeType)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked+                 (Data.ProtoLens.Field.field @"compositeTypes")) ::+              Data.ProtoLens.FieldDescriptor Schema+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, comment__field_descriptor),+           (Data.ProtoLens.Tag 2, name__field_descriptor),+           (Data.ProtoLens.Tag 3, tables__field_descriptor),+           (Data.ProtoLens.Tag 4, enums__field_descriptor),+           (Data.ProtoLens.Tag 5, compositeTypes__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Schema'_unknownFields+        (\ x__ y__ -> x__ {_Schema'_unknownFields = y__})+  defMessage+    = Schema'_constructor+        {_Schema'comment = Data.ProtoLens.fieldDefault,+         _Schema'name = Data.ProtoLens.fieldDefault,+         _Schema'tables = Data.Vector.Generic.empty,+         _Schema'enums = Data.Vector.Generic.empty,+         _Schema'compositeTypes = Data.Vector.Generic.empty,+         _Schema'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Schema+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld CompositeType+             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Enum+                -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Table+                   -> Data.ProtoLens.Encoding.Bytes.Parser Schema+        loop x mutable'compositeTypes mutable'enums mutable'tables+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'compositeTypes <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                                 (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                                    mutable'compositeTypes)+                      frozen'enums <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                        (Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'enums)+                      frozen'tables <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                         (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                            mutable'tables)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'compositeTypes")+                              frozen'compositeTypes+                              (Lens.Family2.set+                                 (Data.ProtoLens.Field.field @"vec'enums") frozen'enums+                                 (Lens.Family2.set+                                    (Data.ProtoLens.Field.field @"vec'tables") frozen'tables x))))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "comment"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"comment") y x)+                                  mutable'compositeTypes mutable'enums mutable'tables+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "name"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"name") y x)+                                  mutable'compositeTypes mutable'enums mutable'tables+                        26+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "tables"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'tables y)+                                loop x mutable'compositeTypes mutable'enums v+                        34+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "enums"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'enums y)+                                loop x mutable'compositeTypes v mutable'tables+                        42+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "composite_types"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append+                                          mutable'compositeTypes y)+                                loop x v mutable'enums mutable'tables+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'compositeTypes mutable'enums mutable'tables+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'compositeTypes <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                          Data.ProtoLens.Encoding.Growing.new+              mutable'enums <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                 Data.ProtoLens.Encoding.Growing.new+              mutable'tables <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                  Data.ProtoLens.Encoding.Growing.new+              loop+                Data.ProtoLens.defMessage mutable'compositeTypes mutable'enums+                mutable'tables)+          "Schema"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"comment") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"name") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8 _v))+                ((Data.Monoid.<>)+                   (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                      (\ _v+                         -> (Data.Monoid.<>)+                              (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                              ((Prelude..)+                                 (\ bs+                                    -> (Data.Monoid.<>)+                                         (Data.ProtoLens.Encoding.Bytes.putVarInt+                                            (Prelude.fromIntegral (Data.ByteString.length bs)))+                                         (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                 Data.ProtoLens.encodeMessage _v))+                      (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'tables") _x))+                   ((Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                         (\ _v+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 34)+                                 ((Prelude..)+                                    (\ bs+                                       -> (Data.Monoid.<>)+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt+                                               (Prelude.fromIntegral (Data.ByteString.length bs)))+                                            (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                    Data.ProtoLens.encodeMessage _v))+                         (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'enums") _x))+                      ((Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                            (\ _v+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 42)+                                    ((Prelude..)+                                       (\ bs+                                          -> (Data.Monoid.<>)+                                               (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                  (Prelude.fromIntegral+                                                     (Data.ByteString.length bs)))+                                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                       Data.ProtoLens.encodeMessage _v))+                            (Lens.Family2.view+                               (Data.ProtoLens.Field.field @"vec'compositeTypes") _x))+                         (Data.ProtoLens.Encoding.Wire.buildFieldSet+                            (Lens.Family2.view Data.ProtoLens.unknownFields _x))))))+instance Control.DeepSeq.NFData Schema where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Schema'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Schema'comment x__)+                (Control.DeepSeq.deepseq+                   (_Schema'name x__)+                   (Control.DeepSeq.deepseq+                      (_Schema'tables x__)+                      (Control.DeepSeq.deepseq+                         (_Schema'enums x__)+                         (Control.DeepSeq.deepseq (_Schema'compositeTypes x__) ())))))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.version' @:: Lens' Settings Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.engine' @:: Lens' Settings Data.Text.Text@+         * 'Proto.Protos.Codegen_Fields.schema' @:: Lens' Settings [Data.Text.Text]@+         * 'Proto.Protos.Codegen_Fields.vec'schema' @:: Lens' Settings (Data.Vector.Vector Data.Text.Text)@+         * 'Proto.Protos.Codegen_Fields.queries' @:: Lens' Settings [Data.Text.Text]@+         * 'Proto.Protos.Codegen_Fields.vec'queries' @:: Lens' Settings (Data.Vector.Vector Data.Text.Text)@+         * 'Proto.Protos.Codegen_Fields.codegen' @:: Lens' Settings Codegen@+         * 'Proto.Protos.Codegen_Fields.maybe'codegen' @:: Lens' Settings (Prelude.Maybe Codegen)@ -}+data Settings+  = Settings'_constructor {_Settings'version :: !Data.Text.Text,+                           _Settings'engine :: !Data.Text.Text,+                           _Settings'schema :: !(Data.Vector.Vector Data.Text.Text),+                           _Settings'queries :: !(Data.Vector.Vector Data.Text.Text),+                           _Settings'codegen :: !(Prelude.Maybe Codegen),+                           _Settings'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Settings where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Settings "version" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Settings'version (\ x__ y__ -> x__ {_Settings'version = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Settings "engine" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Settings'engine (\ x__ y__ -> x__ {_Settings'engine = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Settings "schema" [Data.Text.Text] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Settings'schema (\ x__ y__ -> x__ {_Settings'schema = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Settings "vec'schema" (Data.Vector.Vector Data.Text.Text) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Settings'schema (\ x__ y__ -> x__ {_Settings'schema = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Settings "queries" [Data.Text.Text] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Settings'queries (\ x__ y__ -> x__ {_Settings'queries = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Settings "vec'queries" (Data.Vector.Vector Data.Text.Text) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Settings'queries (\ x__ y__ -> x__ {_Settings'queries = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Settings "codegen" Codegen where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Settings'codegen (\ x__ y__ -> x__ {_Settings'codegen = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Settings "maybe'codegen" (Prelude.Maybe Codegen) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Settings'codegen (\ x__ y__ -> x__ {_Settings'codegen = y__}))+        Prelude.id+instance Data.ProtoLens.Message Settings where+  messageName _ = Data.Text.pack "plugin.Settings"+  packedMessageDescriptor _+    = "\n\+      \\bSettings\DC2\CAN\n\+      \\aversion\CAN\SOH \SOH(\tR\aversion\DC2\SYN\n\+      \\ACKengine\CAN\STX \SOH(\tR\ACKengine\DC2\SYN\n\+      \\ACKschema\CAN\ETX \ETX(\tR\ACKschema\DC2\CAN\n\+      \\aqueries\CAN\EOT \ETX(\tR\aqueries\DC2)\n\+      \\acodegen\CAN\f \SOH(\v2\SI.plugin.CodegenR\acodegenJ\EOT\b\ENQ\DLE\ACKJ\EOT\b\b\DLE\tJ\EOT\b\t\DLE\n\+      \J\EOT\b\n\+      \\DLE\vJ\EOT\b\v\DLE\f"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        version__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "version"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"version")) ::+              Data.ProtoLens.FieldDescriptor Settings+        engine__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "engine"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"engine")) ::+              Data.ProtoLens.FieldDescriptor Settings+        schema__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "schema"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"schema")) ::+              Data.ProtoLens.FieldDescriptor Settings+        queries__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "queries"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"queries")) ::+              Data.ProtoLens.FieldDescriptor Settings+        codegen__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "codegen"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Codegen)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'codegen")) ::+              Data.ProtoLens.FieldDescriptor Settings+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, version__field_descriptor),+           (Data.ProtoLens.Tag 2, engine__field_descriptor),+           (Data.ProtoLens.Tag 3, schema__field_descriptor),+           (Data.ProtoLens.Tag 4, queries__field_descriptor),+           (Data.ProtoLens.Tag 12, codegen__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Settings'_unknownFields+        (\ x__ y__ -> x__ {_Settings'_unknownFields = y__})+  defMessage+    = Settings'_constructor+        {_Settings'version = Data.ProtoLens.fieldDefault,+         _Settings'engine = Data.ProtoLens.fieldDefault,+         _Settings'schema = Data.Vector.Generic.empty,+         _Settings'queries = Data.Vector.Generic.empty,+         _Settings'codegen = Prelude.Nothing, _Settings'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Settings+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text+             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text+                -> Data.ProtoLens.Encoding.Bytes.Parser Settings+        loop x mutable'queries mutable'schema+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'queries <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                          (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                             mutable'queries)+                      frozen'schema <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                         (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                            mutable'schema)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'queries") frozen'queries+                              (Lens.Family2.set+                                 (Data.ProtoLens.Field.field @"vec'schema") frozen'schema x)))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "version"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"version") y x)+                                  mutable'queries mutable'schema+                        18+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "engine"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"engine") y x)+                                  mutable'queries mutable'schema+                        26+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.getText+                                              (Prelude.fromIntegral len))+                                        "schema"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'schema y)+                                loop x mutable'queries v+                        34+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.getText+                                              (Prelude.fromIntegral len))+                                        "queries"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'queries y)+                                loop x v mutable'schema+                        98+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "codegen"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"codegen") y x)+                                  mutable'queries mutable'schema+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'queries mutable'schema+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'queries <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                   Data.ProtoLens.Encoding.Growing.new+              mutable'schema <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                  Data.ProtoLens.Encoding.Growing.new+              loop Data.ProtoLens.defMessage mutable'queries mutable'schema)+          "Settings"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (let+                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"version") _x+              in+                if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                    Data.Monoid.mempty+                else+                    (Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                      ((Prelude..)+                         (\ bs+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt+                                    (Prelude.fromIntegral (Data.ByteString.length bs)))+                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                         Data.Text.Encoding.encodeUtf8 _v))+             ((Data.Monoid.<>)+                (let+                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"engine") _x+                 in+                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                       Data.Monoid.mempty+                   else+                       (Data.Monoid.<>)+                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                         ((Prelude..)+                            (\ bs+                               -> (Data.Monoid.<>)+                                    (Data.ProtoLens.Encoding.Bytes.putVarInt+                                       (Prelude.fromIntegral (Data.ByteString.length bs)))+                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                            Data.Text.Encoding.encodeUtf8 _v))+                ((Data.Monoid.<>)+                   (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                      (\ _v+                         -> (Data.Monoid.<>)+                              (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                              ((Prelude..)+                                 (\ bs+                                    -> (Data.Monoid.<>)+                                         (Data.ProtoLens.Encoding.Bytes.putVarInt+                                            (Prelude.fromIntegral (Data.ByteString.length bs)))+                                         (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                 Data.Text.Encoding.encodeUtf8 _v))+                      (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'schema") _x))+                   ((Data.Monoid.<>)+                      (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                         (\ _v+                            -> (Data.Monoid.<>)+                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 34)+                                 ((Prelude..)+                                    (\ bs+                                       -> (Data.Monoid.<>)+                                            (Data.ProtoLens.Encoding.Bytes.putVarInt+                                               (Prelude.fromIntegral (Data.ByteString.length bs)))+                                            (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                    Data.Text.Encoding.encodeUtf8 _v))+                         (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'queries") _x))+                      ((Data.Monoid.<>)+                         (case+                              Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'codegen") _x+                          of+                            Prelude.Nothing -> Data.Monoid.mempty+                            (Prelude.Just _v)+                              -> (Data.Monoid.<>)+                                   (Data.ProtoLens.Encoding.Bytes.putVarInt 98)+                                   ((Prelude..)+                                      (\ bs+                                         -> (Data.Monoid.<>)+                                              (Data.ProtoLens.Encoding.Bytes.putVarInt+                                                 (Prelude.fromIntegral (Data.ByteString.length bs)))+                                              (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                                      Data.ProtoLens.encodeMessage _v))+                         (Data.ProtoLens.Encoding.Wire.buildFieldSet+                            (Lens.Family2.view Data.ProtoLens.unknownFields _x))))))+instance Control.DeepSeq.NFData Settings where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Settings'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Settings'version x__)+                (Control.DeepSeq.deepseq+                   (_Settings'engine x__)+                   (Control.DeepSeq.deepseq+                      (_Settings'schema x__)+                      (Control.DeepSeq.deepseq+                         (_Settings'queries x__)+                         (Control.DeepSeq.deepseq (_Settings'codegen x__) ())))))+{- | Fields :+     +         * 'Proto.Protos.Codegen_Fields.rel' @:: Lens' Table Identifier@+         * 'Proto.Protos.Codegen_Fields.maybe'rel' @:: Lens' Table (Prelude.Maybe Identifier)@+         * 'Proto.Protos.Codegen_Fields.columns' @:: Lens' Table [Column]@+         * 'Proto.Protos.Codegen_Fields.vec'columns' @:: Lens' Table (Data.Vector.Vector Column)@+         * 'Proto.Protos.Codegen_Fields.comment' @:: Lens' Table Data.Text.Text@ -}+data Table+  = Table'_constructor {_Table'rel :: !(Prelude.Maybe Identifier),+                        _Table'columns :: !(Data.Vector.Vector Column),+                        _Table'comment :: !Data.Text.Text,+                        _Table'_unknownFields :: !Data.ProtoLens.FieldSet}+  deriving stock (Prelude.Eq, Prelude.Ord)+instance Prelude.Show Table where+  showsPrec _ __x __s+    = Prelude.showChar+        '{'+        (Prelude.showString+           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))+instance Data.ProtoLens.Field.HasField Table "rel" Identifier where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Table'rel (\ x__ y__ -> x__ {_Table'rel = y__}))+        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)+instance Data.ProtoLens.Field.HasField Table "maybe'rel" (Prelude.Maybe Identifier) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Table'rel (\ x__ y__ -> x__ {_Table'rel = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Table "columns" [Column] where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Table'columns (\ x__ y__ -> x__ {_Table'columns = y__}))+        (Lens.Family2.Unchecked.lens+           Data.Vector.Generic.toList+           (\ _ y__ -> Data.Vector.Generic.fromList y__))+instance Data.ProtoLens.Field.HasField Table "vec'columns" (Data.Vector.Vector Column) where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Table'columns (\ x__ y__ -> x__ {_Table'columns = y__}))+        Prelude.id+instance Data.ProtoLens.Field.HasField Table "comment" Data.Text.Text where+  fieldOf _+    = (Prelude..)+        (Lens.Family2.Unchecked.lens+           _Table'comment (\ x__ y__ -> x__ {_Table'comment = y__}))+        Prelude.id+instance Data.ProtoLens.Message Table where+  messageName _ = Data.Text.pack "plugin.Table"+  packedMessageDescriptor _+    = "\n\+      \\ENQTable\DC2$\n\+      \\ETXrel\CAN\SOH \SOH(\v2\DC2.plugin.IdentifierR\ETXrel\DC2(\n\+      \\acolumns\CAN\STX \ETX(\v2\SO.plugin.ColumnR\acolumns\DC2\CAN\n\+      \\acomment\CAN\ETX \SOH(\tR\acomment"+  packedFileDescriptor _ = packedFileDescriptor+  fieldsByTag+    = let+        rel__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "rel"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Identifier)+              (Data.ProtoLens.OptionalField+                 (Data.ProtoLens.Field.field @"maybe'rel")) ::+              Data.ProtoLens.FieldDescriptor Table+        columns__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "columns"+              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::+                 Data.ProtoLens.FieldTypeDescriptor Column)+              (Data.ProtoLens.RepeatedField+                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"columns")) ::+              Data.ProtoLens.FieldDescriptor Table+        comment__field_descriptor+          = Data.ProtoLens.FieldDescriptor+              "comment"+              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+              (Data.ProtoLens.PlainField+                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"comment")) ::+              Data.ProtoLens.FieldDescriptor Table+      in+        Data.Map.fromList+          [(Data.ProtoLens.Tag 1, rel__field_descriptor),+           (Data.ProtoLens.Tag 2, columns__field_descriptor),+           (Data.ProtoLens.Tag 3, comment__field_descriptor)]+  unknownFields+    = Lens.Family2.Unchecked.lens+        _Table'_unknownFields+        (\ x__ y__ -> x__ {_Table'_unknownFields = y__})+  defMessage+    = Table'_constructor+        {_Table'rel = Prelude.Nothing,+         _Table'columns = Data.Vector.Generic.empty,+         _Table'comment = Data.ProtoLens.fieldDefault,+         _Table'_unknownFields = []}+  parseMessage+    = let+        loop ::+          Table+          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Column+             -> Data.ProtoLens.Encoding.Bytes.Parser Table+        loop x mutable'columns+          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd+               if end then+                   do frozen'columns <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                          (Data.ProtoLens.Encoding.Growing.unsafeFreeze+                                             mutable'columns)+                      (let missing = []+                       in+                         if Prelude.null missing then+                             Prelude.return ()+                         else+                             Prelude.fail+                               ((Prelude.++)+                                  "Missing required fields: "+                                  (Prelude.show (missing :: [Prelude.String]))))+                      Prelude.return+                        (Lens.Family2.over+                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)+                           (Lens.Family2.set+                              (Data.ProtoLens.Field.field @"vec'columns") frozen'columns x))+               else+                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt+                      case tag of+                        10+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.isolate+                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)+                                       "rel"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rel") y x)+                                  mutable'columns+                        18+                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                            Data.ProtoLens.Encoding.Bytes.isolate+                                              (Prelude.fromIntegral len)+                                              Data.ProtoLens.parseMessage)+                                        "columns"+                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                       (Data.ProtoLens.Encoding.Growing.append mutable'columns y)+                                loop x v+                        26+                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)+                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt+                                           Data.ProtoLens.Encoding.Bytes.getText+                                             (Prelude.fromIntegral len))+                                       "comment"+                                loop+                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"comment") y x)+                                  mutable'columns+                        wire+                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire+                                        wire+                                loop+                                  (Lens.Family2.over+                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)+                                  mutable'columns+      in+        (Data.ProtoLens.Encoding.Bytes.<?>)+          (do mutable'columns <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO+                                   Data.ProtoLens.Encoding.Growing.new+              loop Data.ProtoLens.defMessage mutable'columns)+          "Table"+  buildMessage+    = \ _x+        -> (Data.Monoid.<>)+             (case+                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'rel") _x+              of+                Prelude.Nothing -> Data.Monoid.mempty+                (Prelude.Just _v)+                  -> (Data.Monoid.<>)+                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)+                       ((Prelude..)+                          (\ bs+                             -> (Data.Monoid.<>)+                                  (Data.ProtoLens.Encoding.Bytes.putVarInt+                                     (Prelude.fromIntegral (Data.ByteString.length bs)))+                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                          Data.ProtoLens.encodeMessage _v))+             ((Data.Monoid.<>)+                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder+                   (\ _v+                      -> (Data.Monoid.<>)+                           (Data.ProtoLens.Encoding.Bytes.putVarInt 18)+                           ((Prelude..)+                              (\ bs+                                 -> (Data.Monoid.<>)+                                      (Data.ProtoLens.Encoding.Bytes.putVarInt+                                         (Prelude.fromIntegral (Data.ByteString.length bs)))+                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                              Data.ProtoLens.encodeMessage _v))+                   (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'columns") _x))+                ((Data.Monoid.<>)+                   (let+                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"comment") _x+                    in+                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then+                          Data.Monoid.mempty+                      else+                          (Data.Monoid.<>)+                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)+                            ((Prelude..)+                               (\ bs+                                  -> (Data.Monoid.<>)+                                       (Data.ProtoLens.Encoding.Bytes.putVarInt+                                          (Prelude.fromIntegral (Data.ByteString.length bs)))+                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))+                               Data.Text.Encoding.encodeUtf8 _v))+                   (Data.ProtoLens.Encoding.Wire.buildFieldSet+                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))+instance Control.DeepSeq.NFData Table where+  rnf+    = \ x__+        -> Control.DeepSeq.deepseq+             (_Table'_unknownFields x__)+             (Control.DeepSeq.deepseq+                (_Table'rel x__)+                (Control.DeepSeq.deepseq+                   (_Table'columns x__)+                   (Control.DeepSeq.deepseq (_Table'comment x__) ())))+data CodegenService = CodegenService {}+instance Data.ProtoLens.Service.Types.Service CodegenService where+  type ServiceName CodegenService = "CodegenService"+  type ServicePackage CodegenService = "plugin"+  type ServiceMethods CodegenService = '["generate"]+  packedServiceDescriptor _+    = "\n\+      \\SOCodegenService\DC2=\n\+      \\bGenerate\DC2\ETB.plugin.GenerateRequest\SUB\CAN.plugin.GenerateResponse"+instance Data.ProtoLens.Service.Types.HasMethodImpl CodegenService "generate" where+  type MethodName CodegenService "generate" = "Generate"+  type MethodInput CodegenService "generate" = GenerateRequest+  type MethodOutput CodegenService "generate" = GenerateResponse+  type MethodStreamingType CodegenService "generate" = 'Data.ProtoLens.Service.Types.NonStreaming+packedFileDescriptor :: Data.ByteString.ByteString+packedFileDescriptor+  = "\n\+    \\DC4protos/codegen.proto\DC2\ACKplugin\"6\n\+    \\EOTFile\DC2\DC2\n\+    \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2\SUB\n\+    \\bcontents\CAN\STX \SOH(\fR\bcontents\"\183\SOH\n\+    \\bSettings\DC2\CAN\n\+    \\aversion\CAN\SOH \SOH(\tR\aversion\DC2\SYN\n\+    \\ACKengine\CAN\STX \SOH(\tR\ACKengine\DC2\SYN\n\+    \\ACKschema\CAN\ETX \ETX(\tR\ACKschema\DC2\CAN\n\+    \\aqueries\CAN\EOT \ETX(\tR\aqueries\DC2)\n\+    \\acodegen\CAN\f \SOH(\v2\SI.plugin.CodegenR\acodegenJ\EOT\b\ENQ\DLE\ACKJ\EOT\b\b\DLE\tJ\EOT\b\t\DLE\n\+    \J\EOT\b\n\+    \\DLE\vJ\EOT\b\v\DLE\f\"\139\STX\n\+    \\aCodegen\DC2\DLE\n\+    \\ETXout\CAN\SOH \SOH(\tR\ETXout\DC2\SYN\n\+    \\ACKplugin\CAN\STX \SOH(\tR\ACKplugin\DC2\CAN\n\+    \\aoptions\CAN\ETX \SOH(\fR\aoptions\DC2\DLE\n\+    \\ETXenv\CAN\EOT \ETX(\tR\ETXenv\DC21\n\+    \\aprocess\CAN\ENQ \SOH(\v2\ETB.plugin.Codegen.ProcessR\aprocess\DC2(\n\+    \\EOTwasm\CAN\ACK \SOH(\v2\DC4.plugin.Codegen.WASMR\EOTwasm\SUB\ESC\n\+    \\aProcess\DC2\DLE\n\+    \\ETXcmd\CAN\SOH \SOH(\tR\ETXcmd\SUB0\n\+    \\EOTWASM\DC2\DLE\n\+    \\ETXurl\CAN\SOH \SOH(\tR\ETXurl\DC2\SYN\n\+    \\ACKsha256\CAN\STX \SOH(\tR\ACKsha256\"\136\SOH\n\+    \\aCatalog\DC2\CAN\n\+    \\acomment\CAN\SOH \SOH(\tR\acomment\DC2%\n\+    \\SOdefault_schema\CAN\STX \SOH(\tR\rdefaultSchema\DC2\DC2\n\+    \\EOTname\CAN\ETX \SOH(\tR\EOTname\DC2(\n\+    \\aschemas\CAN\EOT \ETX(\v2\SO.plugin.SchemaR\aschemas\"\193\SOH\n\+    \\ACKSchema\DC2\CAN\n\+    \\acomment\CAN\SOH \SOH(\tR\acomment\DC2\DC2\n\+    \\EOTname\CAN\STX \SOH(\tR\EOTname\DC2%\n\+    \\ACKtables\CAN\ETX \ETX(\v2\r.plugin.TableR\ACKtables\DC2\"\n\+    \\ENQenums\CAN\EOT \ETX(\v2\f.plugin.EnumR\ENQenums\DC2>\n\+    \\SIcomposite_types\CAN\ENQ \ETX(\v2\NAK.plugin.CompositeTypeR\SOcompositeTypes\"=\n\+    \\rCompositeType\DC2\DC2\n\+    \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2\CAN\n\+    \\acomment\CAN\STX \SOH(\tR\acomment\"H\n\+    \\EOTEnum\DC2\DC2\n\+    \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2\DC2\n\+    \\EOTvals\CAN\STX \ETX(\tR\EOTvals\DC2\CAN\n\+    \\acomment\CAN\ETX \SOH(\tR\acomment\"q\n\+    \\ENQTable\DC2$\n\+    \\ETXrel\CAN\SOH \SOH(\v2\DC2.plugin.IdentifierR\ETXrel\DC2(\n\+    \\acolumns\CAN\STX \ETX(\v2\SO.plugin.ColumnR\acolumns\DC2\CAN\n\+    \\acomment\CAN\ETX \SOH(\tR\acomment\"R\n\+    \\n\+    \Identifier\DC2\CAN\n\+    \\acatalog\CAN\SOH \SOH(\tR\acatalog\DC2\SYN\n\+    \\ACKschema\CAN\STX \SOH(\tR\ACKschema\DC2\DC2\n\+    \\EOTname\CAN\ETX \SOH(\tR\EOTname\"\142\EOT\n\+    \\ACKColumn\DC2\DC2\n\+    \\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2\EM\n\+    \\bnot_null\CAN\ETX \SOH(\bR\anotNull\DC2\EM\n\+    \\bis_array\CAN\EOT \SOH(\bR\aisArray\DC2\CAN\n\+    \\acomment\CAN\ENQ \SOH(\tR\acomment\DC2\SYN\n\+    \\ACKlength\CAN\ACK \SOH(\ENQR\ACKlength\DC2$\n\+    \\SOis_named_param\CAN\a \SOH(\bR\fisNamedParam\DC2 \n\+    \\fis_func_call\CAN\b \SOH(\bR\n\+    \isFuncCall\DC2\DC4\n\+    \\ENQscope\CAN\t \SOH(\tR\ENQscope\DC2(\n\+    \\ENQtable\CAN\n\+    \ \SOH(\v2\DC2.plugin.IdentifierR\ENQtable\DC2\US\n\+    \\vtable_alias\CAN\v \SOH(\tR\n\+    \tableAlias\DC2&\n\+    \\EOTtype\CAN\f \SOH(\v2\DC2.plugin.IdentifierR\EOTtype\DC2\"\n\+    \\ris_sqlc_slice\CAN\r \SOH(\bR\visSqlcSlice\DC23\n\+    \\vembed_table\CAN\SO \SOH(\v2\DC2.plugin.IdentifierR\n\+    \embedTable\DC2#\n\+    \\roriginal_name\CAN\SI \SOH(\tR\foriginalName\DC2\SUB\n\+    \\bunsigned\CAN\DLE \SOH(\bR\bunsigned\DC2\GS\n\+    \\n\+    \array_dims\CAN\DC1 \SOH(\ENQR\tarrayDims\"\148\STX\n\+    \\ENQQuery\DC2\DC2\n\+    \\EOTtext\CAN\SOH \SOH(\tR\EOTtext\DC2\DC2\n\+    \\EOTname\CAN\STX \SOH(\tR\EOTname\DC2\DLE\n\+    \\ETXcmd\CAN\ETX \SOH(\tR\ETXcmd\DC2(\n\+    \\acolumns\CAN\EOT \ETX(\v2\SO.plugin.ColumnR\acolumns\DC2-\n\+    \\ACKparams\CAN\ENQ \ETX(\v2\DC1.plugin.ParameterR\n\+    \parameters\DC2\SUB\n\+    \\bcomments\CAN\ACK \ETX(\tR\bcomments\DC2\SUB\n\+    \\bfilename\CAN\a \SOH(\tR\bfilename\DC2@\n\+    \\DC1insert_into_table\CAN\b \SOH(\v2\DC2.plugin.IdentifierR\DC1insert_into_table\"K\n\+    \\tParameter\DC2\SYN\n\+    \\ACKnumber\CAN\SOH \SOH(\ENQR\ACKnumber\DC2&\n\+    \\ACKcolumn\CAN\STX \SOH(\v2\SO.plugin.ColumnR\ACKcolumn\"\135\STX\n\+    \\SIGenerateRequest\DC2,\n\+    \\bsettings\CAN\SOH \SOH(\v2\DLE.plugin.SettingsR\bsettings\DC2)\n\+    \\acatalog\CAN\STX \SOH(\v2\SI.plugin.CatalogR\acatalog\DC2'\n\+    \\aqueries\CAN\ETX \ETX(\v2\r.plugin.QueryR\aqueries\DC2\"\n\+    \\fsqlc_version\CAN\EOT \SOH(\tR\fsqlc_version\DC2&\n\+    \\SOplugin_options\CAN\ENQ \SOH(\fR\SOplugin_options\DC2&\n\+    \\SOglobal_options\CAN\ACK \SOH(\fR\SOglobal_options\"6\n\+    \\DLEGenerateResponse\DC2\"\n\+    \\ENQfiles\CAN\SOH \ETX(\v2\f.plugin.FileR\ENQfiles2O\n\+    \\SOCodegenService\DC2=\n\+    \\bGenerate\DC2\ETB.plugin.GenerateRequest\SUB\CAN.plugin.GenerateResponseJ\225\&0\n\+    \\a\DC2\ENQ\NUL\NUL\131\SOH\SOH\n\+    \\b\n\+    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\+    \\b\n\+    \\SOH\STX\DC2\ETX\STX\NUL\SI\n\+    \\n\+    \\n\+    \\STX\ACK\NUL\DC2\EOT\EOT\NUL\ACK\SOH\n\+    \\n\+    \\n\+    \\ETX\ACK\NUL\SOH\DC2\ETX\EOT\b\SYN\n\+    \\v\n\+    \\EOT\ACK\NUL\STX\NUL\DC2\ETX\ENQ\STX<\n\+    \\f\n\+    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETX\ENQ\ACK\SO\n\+    \\f\n\+    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX\ENQ\DLE\US\n\+    \\f\n\+    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX\ENQ*:\n\+    \\n\+    \\n\+    \\STX\EOT\NUL\DC2\EOT\b\NUL\v\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\NUL\SOH\DC2\ETX\b\b\f\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\t\STX'\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\t\STX\b\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\t\t\r\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\t\DLE\DC1\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\b\DC2\ETX\t\DC2&\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\n\+    \\DC2\ETX\t\DC3%\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\NUL\n\+    \\DC2\ETX\t\US%\n\+    \\v\n\+    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\n\+    \\STX.\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\n\+    \\STX\a\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\n\+    \\b\DLE\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\n\+    \\DC3\DC4\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\b\DC2\ETX\n\+    \\NAK-\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\n\+    \\DC2\ETX\n\+    \\SYN,\n\+    \\f\n\+    \\ENQ\EOT\NUL\STX\SOH\n\+    \\DC2\ETX\n\+    \\",\n\+    \\n\+    \\n\+    \\STX\EOT\SOH\DC2\EOT\r\NUL\ESC\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\SOH\SOH\DC2\ETX\r\b\DLE\n\+    \\197\SOH\n\+    \\ETX\EOT\SOH\t\DC2\ETX\DC4\STX\ESC\SUB\184\SOH Rename message was field 5\n\+    \ Overides message was field 6\n\+    \ PythonCode message was field 8\n\+    \ KotlinCode message was field 9\n\+    \ GoCode message was field 10;\n\+    \ JSONCode message was field 11;\n\+    \\n\+    \\v\n\+    \\EOT\EOT\SOH\t\NUL\DC2\ETX\DC4\v\f\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\NUL\SOH\DC2\ETX\DC4\v\f\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\NUL\STX\DC2\ETX\DC4\v\f\n\+    \\v\n\+    \\EOT\EOT\SOH\t\SOH\DC2\ETX\DC4\SO\SI\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\SOH\SOH\DC2\ETX\DC4\SO\SI\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\SOH\STX\DC2\ETX\DC4\SO\SI\n\+    \\v\n\+    \\EOT\EOT\SOH\t\STX\DC2\ETX\DC4\DC1\DC2\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\STX\SOH\DC2\ETX\DC4\DC1\DC2\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\STX\STX\DC2\ETX\DC4\DC1\DC2\n\+    \\v\n\+    \\EOT\EOT\SOH\t\ETX\DC2\ETX\DC4\DC4\SYN\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\ETX\SOH\DC2\ETX\DC4\DC4\SYN\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\ETX\STX\DC2\ETX\DC4\DC4\SYN\n\+    \\v\n\+    \\EOT\EOT\SOH\t\EOT\DC2\ETX\DC4\CAN\SUB\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\EOT\SOH\DC2\ETX\DC4\CAN\SUB\n\+    \\f\n\+    \\ENQ\EOT\SOH\t\EOT\STX\DC2\ETX\DC4\CAN\SUB\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\SYN\STX-\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX\SYN\STX\b\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\SYN\t\DLE\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\SYN\DC3\DC4\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\b\DC2\ETX\SYN\NAK,\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\n\+    \\DC2\ETX\SYN\SYN+\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\NUL\n\+    \\DC2\ETX\SYN\"+\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\SOH\DC2\ETX\ETB\STX+\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\ENQ\DC2\ETX\ETB\STX\b\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX\ETB\t\SI\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX\ETB\DC2\DC3\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\b\DC2\ETX\ETB\DC4*\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\n\+    \\DC2\ETX\ETB\NAK)\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\SOH\n\+    \\DC2\ETX\ETB!)\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\STX\DC2\ETX\CAN\STX4\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\EOT\DC2\ETX\CAN\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\ENQ\DC2\ETX\CAN\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\SOH\DC2\ETX\CAN\DC2\CAN\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\ETX\DC2\ETX\CAN\ESC\FS\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\b\DC2\ETX\CAN\GS3\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\n\+    \\DC2\ETX\CAN\RS2\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\STX\n\+    \\DC2\ETX\CAN*2\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\ETX\DC2\ETX\EM\STX6\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\ETX\EOT\DC2\ETX\EM\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\ETX\ENQ\DC2\ETX\EM\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\ETX\SOH\DC2\ETX\EM\DC2\EM\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\ETX\ETX\DC2\ETX\EM\FS\GS\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\ETX\b\DC2\ETX\EM\RS5\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\ETX\n\+    \\DC2\ETX\EM\US4\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\ETX\n\+    \\DC2\ETX\EM+4\n\+    \\v\n\+    \\EOT\EOT\SOH\STX\EOT\DC2\ETX\SUB\STX/\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\EOT\ACK\DC2\ETX\SUB\STX\t\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\EOT\SOH\DC2\ETX\SUB\n\+    \\DC1\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\EOT\ETX\DC2\ETX\SUB\DC4\SYN\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\EOT\b\DC2\ETX\SUB\ETB.\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\EOT\n\+    \\DC2\ETX\SUB\CAN-\n\+    \\f\n\+    \\ENQ\EOT\SOH\STX\EOT\n\+    \\DC2\ETX\SUB$-\n\+    \\n\+    \\n\+    \\STX\EOT\STX\DC2\EOT\GS\NUL+\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\STX\SOH\DC2\ETX\GS\b\SI\n\+    \\f\n\+    \\EOT\EOT\STX\ETX\NUL\DC2\EOT\RS\STX \ETX\n\+    \\f\n\+    \\ENQ\EOT\STX\ETX\NUL\SOH\DC2\ETX\RS\n\+    \\DC1\n\+    \\r\n\+    \\ACK\EOT\STX\ETX\NUL\STX\NUL\DC2\ETX\US\EOT\DC3\n\+    \\SO\n\+    \\a\EOT\STX\ETX\NUL\STX\NUL\ENQ\DC2\ETX\US\EOT\n\+    \\n\+    \\SO\n\+    \\a\EOT\STX\ETX\NUL\STX\NUL\SOH\DC2\ETX\US\v\SO\n\+    \\SO\n\+    \\a\EOT\STX\ETX\NUL\STX\NUL\ETX\DC2\ETX\US\DC1\DC2\n\+    \\f\n\+    \\EOT\EOT\STX\ETX\SOH\DC2\EOT!\STX$\ETX\n\+    \\f\n\+    \\ENQ\EOT\STX\ETX\SOH\SOH\DC2\ETX!\n\+    \\SO\n\+    \\r\n\+    \\ACK\EOT\STX\ETX\SOH\STX\NUL\DC2\ETX\"\EOT\DC3\n\+    \\SO\n\+    \\a\EOT\STX\ETX\SOH\STX\NUL\ENQ\DC2\ETX\"\EOT\n\+    \\n\+    \\SO\n\+    \\a\EOT\STX\ETX\SOH\STX\NUL\SOH\DC2\ETX\"\v\SO\n\+    \\SO\n\+    \\a\EOT\STX\ETX\SOH\STX\NUL\ETX\DC2\ETX\"\DC1\DC2\n\+    \\r\n\+    \\ACK\EOT\STX\ETX\SOH\STX\SOH\DC2\ETX#\EOT\SYN\n\+    \\SO\n\+    \\a\EOT\STX\ETX\SOH\STX\SOH\ENQ\DC2\ETX#\EOT\n\+    \\n\+    \\SO\n\+    \\a\EOT\STX\ETX\SOH\STX\SOH\SOH\DC2\ETX#\v\DC1\n\+    \\SO\n\+    \\a\EOT\STX\ETX\SOH\STX\SOH\ETX\DC2\ETX#\DC4\NAK\n\+    \\v\n\+    \\EOT\EOT\STX\STX\NUL\DC2\ETX%\STX%\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX%\STX\b\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX%\t\f\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX%\SI\DLE\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\b\DC2\ETX%\DC1$\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\n\+    \\DC2\ETX%\DC2#\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\NUL\n\+    \\DC2\ETX%\RS#\n\+    \\v\n\+    \\EOT\EOT\STX\STX\SOH\DC2\ETX&\STX+\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\ENQ\DC2\ETX&\STX\b\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETX&\t\SI\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETX&\DC2\DC3\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\b\DC2\ETX&\DC4*\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\n\+    \\DC2\ETX&\NAK)\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\SOH\n\+    \\DC2\ETX&!)\n\+    \\v\n\+    \\EOT\EOT\STX\STX\STX\DC2\ETX'\STX,\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\ENQ\DC2\ETX'\STX\a\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\SOH\DC2\ETX'\b\SI\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\ETX\DC2\ETX'\DC2\DC3\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\b\DC2\ETX'\DC4+\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\n\+    \\DC2\ETX'\NAK*\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\STX\n\+    \\DC2\ETX'!*\n\+    \\v\n\+    \\EOT\EOT\STX\STX\ETX\DC2\ETX(\STX.\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ETX\EOT\DC2\ETX(\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ETX\ENQ\DC2\ETX(\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ETX\SOH\DC2\ETX(\DC2\NAK\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ETX\ETX\DC2\ETX(\CAN\EM\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ETX\b\DC2\ETX(\SUB-\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ETX\n\+    \\DC2\ETX(\ESC,\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ETX\n\+    \\DC2\ETX(',\n\+    \\v\n\+    \\EOT\EOT\STX\STX\EOT\DC2\ETX)\STX.\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\EOT\ACK\DC2\ETX)\STX\t\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\EOT\SOH\DC2\ETX)\n\+    \\DC1\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\EOT\ETX\DC2\ETX)\DC4\NAK\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\EOT\b\DC2\ETX)\SYN-\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\EOT\n\+    \\DC2\ETX)\ETB,\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\EOT\n\+    \\DC2\ETX)#,\n\+    \\v\n\+    \\EOT\EOT\STX\STX\ENQ\DC2\ETX*\STX%\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ENQ\ACK\DC2\ETX*\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ENQ\SOH\DC2\ETX*\a\v\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ENQ\ETX\DC2\ETX*\SO\SI\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ENQ\b\DC2\ETX*\DLE$\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ENQ\n\+    \\DC2\ETX*\DC1#\n\+    \\f\n\+    \\ENQ\EOT\STX\STX\ENQ\n\+    \\DC2\ETX*\GS#\n\+    \\n\+    \\n\+    \\STX\EOT\ETX\DC2\EOT-\NUL2\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\ETX\SOH\DC2\ETX-\b\SI\n\+    \\v\n\+    \\EOT\EOT\ETX\STX\NUL\DC2\ETX.\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\ENQ\DC2\ETX.\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETX.\t\DLE\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETX.\DC3\DC4\n\+    \\v\n\+    \\EOT\EOT\ETX\STX\SOH\DC2\ETX/\STX\FS\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\SOH\ENQ\DC2\ETX/\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\SOH\SOH\DC2\ETX/\t\ETB\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\SOH\ETX\DC2\ETX/\SUB\ESC\n\+    \\v\n\+    \\EOT\EOT\ETX\STX\STX\DC2\ETX0\STX\DC2\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\STX\ENQ\DC2\ETX0\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\STX\SOH\DC2\ETX0\t\r\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\STX\ETX\DC2\ETX0\DLE\DC1\n\+    \\v\n\+    \\EOT\EOT\ETX\STX\ETX\DC2\ETX1\STX\RS\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\ETX\EOT\DC2\ETX1\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\ETX\ACK\DC2\ETX1\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\ETX\SOH\DC2\ETX1\DC2\EM\n\+    \\f\n\+    \\ENQ\EOT\ETX\STX\ETX\ETX\DC2\ETX1\FS\GS\n\+    \\n\+    \\n\+    \\STX\EOT\EOT\DC2\EOT4\NUL:\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\EOT\SOH\DC2\ETX4\b\SO\n\+    \\v\n\+    \\EOT\EOT\EOT\STX\NUL\DC2\ETX5\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\ENQ\DC2\ETX5\STX\b\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETX5\t\DLE\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETX5\DC3\DC4\n\+    \\v\n\+    \\EOT\EOT\EOT\STX\SOH\DC2\ETX6\STX\DC2\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\SOH\ENQ\DC2\ETX6\STX\b\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\SOH\SOH\DC2\ETX6\t\r\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\SOH\ETX\DC2\ETX6\DLE\DC1\n\+    \\v\n\+    \\EOT\EOT\EOT\STX\STX\DC2\ETX7\STX\FS\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\STX\EOT\DC2\ETX7\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\STX\ACK\DC2\ETX7\v\DLE\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\STX\SOH\DC2\ETX7\DC1\ETB\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\STX\ETX\DC2\ETX7\SUB\ESC\n\+    \\v\n\+    \\EOT\EOT\EOT\STX\ETX\DC2\ETX8\STX\SUB\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\ETX\EOT\DC2\ETX8\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\ETX\ACK\DC2\ETX8\v\SI\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\ETX\SOH\DC2\ETX8\DLE\NAK\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\ETX\ETX\DC2\ETX8\CAN\EM\n\+    \\v\n\+    \\EOT\EOT\EOT\STX\EOT\DC2\ETX9\STX-\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\EOT\EOT\DC2\ETX9\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\EOT\ACK\DC2\ETX9\v\CAN\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\EOT\SOH\DC2\ETX9\EM(\n\+    \\f\n\+    \\ENQ\EOT\EOT\STX\EOT\ETX\DC2\ETX9+,\n\+    \\n\+    \\n\+    \\STX\EOT\ENQ\DC2\EOT<\NUL?\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\ENQ\SOH\DC2\ETX<\b\NAK\n\+    \\v\n\+    \\EOT\EOT\ENQ\STX\NUL\DC2\ETX=\STX\DC2\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\ENQ\DC2\ETX=\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\SOH\DC2\ETX=\t\r\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\NUL\ETX\DC2\ETX=\DLE\DC1\n\+    \\v\n\+    \\EOT\EOT\ENQ\STX\SOH\DC2\ETX>\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\SOH\ENQ\DC2\ETX>\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\SOH\SOH\DC2\ETX>\t\DLE\n\+    \\f\n\+    \\ENQ\EOT\ENQ\STX\SOH\ETX\DC2\ETX>\DC3\DC4\n\+    \\n\+    \\n\+    \\STX\EOT\ACK\DC2\EOTA\NULE\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\ACK\SOH\DC2\ETXA\b\f\n\+    \\v\n\+    \\EOT\EOT\ACK\STX\NUL\DC2\ETXB\STX\DC2\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\NUL\ENQ\DC2\ETXB\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\NUL\SOH\DC2\ETXB\t\r\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\NUL\ETX\DC2\ETXB\DLE\DC1\n\+    \\v\n\+    \\EOT\EOT\ACK\STX\SOH\DC2\ETXC\STX\ESC\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\SOH\EOT\DC2\ETXC\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\SOH\ENQ\DC2\ETXC\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\SOH\SOH\DC2\ETXC\DC2\SYN\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\SOH\ETX\DC2\ETXC\EM\SUB\n\+    \\v\n\+    \\EOT\EOT\ACK\STX\STX\DC2\ETXD\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\STX\ENQ\DC2\ETXD\STX\b\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\STX\SOH\DC2\ETXD\t\DLE\n\+    \\f\n\+    \\ENQ\EOT\ACK\STX\STX\ETX\DC2\ETXD\DC3\DC4\n\+    \\n\+    \\n\+    \\STX\EOT\a\DC2\EOTG\NULK\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\a\SOH\DC2\ETXG\b\r\n\+    \\v\n\+    \\EOT\EOT\a\STX\NUL\DC2\ETXH\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\a\STX\NUL\ACK\DC2\ETXH\STX\f\n\+    \\f\n\+    \\ENQ\EOT\a\STX\NUL\SOH\DC2\ETXH\r\DLE\n\+    \\f\n\+    \\ENQ\EOT\a\STX\NUL\ETX\DC2\ETXH\DC3\DC4\n\+    \\v\n\+    \\EOT\EOT\a\STX\SOH\DC2\ETXI\STX\RS\n\+    \\f\n\+    \\ENQ\EOT\a\STX\SOH\EOT\DC2\ETXI\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\a\STX\SOH\ACK\DC2\ETXI\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\a\STX\SOH\SOH\DC2\ETXI\DC2\EM\n\+    \\f\n\+    \\ENQ\EOT\a\STX\SOH\ETX\DC2\ETXI\FS\GS\n\+    \\v\n\+    \\EOT\EOT\a\STX\STX\DC2\ETXJ\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\a\STX\STX\ENQ\DC2\ETXJ\STX\b\n\+    \\f\n\+    \\ENQ\EOT\a\STX\STX\SOH\DC2\ETXJ\t\DLE\n\+    \\f\n\+    \\ENQ\EOT\a\STX\STX\ETX\DC2\ETXJ\DC3\DC4\n\+    \\n\+    \\n\+    \\STX\EOT\b\DC2\EOTM\NULQ\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\b\SOH\DC2\ETXM\b\DC2\n\+    \\v\n\+    \\EOT\EOT\b\STX\NUL\DC2\ETXN\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\b\STX\NUL\ENQ\DC2\ETXN\STX\b\n\+    \\f\n\+    \\ENQ\EOT\b\STX\NUL\SOH\DC2\ETXN\t\DLE\n\+    \\f\n\+    \\ENQ\EOT\b\STX\NUL\ETX\DC2\ETXN\DC3\DC4\n\+    \\v\n\+    \\EOT\EOT\b\STX\SOH\DC2\ETXO\STX\DC4\n\+    \\f\n\+    \\ENQ\EOT\b\STX\SOH\ENQ\DC2\ETXO\STX\b\n\+    \\f\n\+    \\ENQ\EOT\b\STX\SOH\SOH\DC2\ETXO\t\SI\n\+    \\f\n\+    \\ENQ\EOT\b\STX\SOH\ETX\DC2\ETXO\DC2\DC3\n\+    \\v\n\+    \\EOT\EOT\b\STX\STX\DC2\ETXP\STX\DC2\n\+    \\f\n\+    \\ENQ\EOT\b\STX\STX\ENQ\DC2\ETXP\STX\b\n\+    \\f\n\+    \\ENQ\EOT\b\STX\STX\SOH\DC2\ETXP\t\r\n\+    \\f\n\+    \\ENQ\EOT\b\STX\STX\ETX\DC2\ETXP\DLE\DC1\n\+    \\n\+    \\n\+    \\STX\EOT\t\DC2\EOTS\NULf\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\t\SOH\DC2\ETXS\b\SO\n\+    \\v\n\+    \\EOT\EOT\t\STX\NUL\DC2\ETXT\STX\DC2\n\+    \\f\n\+    \\ENQ\EOT\t\STX\NUL\ENQ\DC2\ETXT\STX\b\n\+    \\f\n\+    \\ENQ\EOT\t\STX\NUL\SOH\DC2\ETXT\t\r\n\+    \\f\n\+    \\ENQ\EOT\t\STX\NUL\ETX\DC2\ETXT\DLE\DC1\n\+    \\v\n\+    \\EOT\EOT\t\STX\SOH\DC2\ETXU\STX\DC4\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SOH\ENQ\DC2\ETXU\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SOH\SOH\DC2\ETXU\a\SI\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SOH\ETX\DC2\ETXU\DC2\DC3\n\+    \\v\n\+    \\EOT\EOT\t\STX\STX\DC2\ETXV\STX\DC4\n\+    \\f\n\+    \\ENQ\EOT\t\STX\STX\ENQ\DC2\ETXV\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\STX\SOH\DC2\ETXV\a\SI\n\+    \\f\n\+    \\ENQ\EOT\t\STX\STX\ETX\DC2\ETXV\DC2\DC3\n\+    \\v\n\+    \\EOT\EOT\t\STX\ETX\DC2\ETXW\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ETX\ENQ\DC2\ETXW\STX\b\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ETX\SOH\DC2\ETXW\t\DLE\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ETX\ETX\DC2\ETXW\DC3\DC4\n\+    \\v\n\+    \\EOT\EOT\t\STX\EOT\DC2\ETXX\STX\DC3\n\+    \\f\n\+    \\ENQ\EOT\t\STX\EOT\ENQ\DC2\ETXX\STX\a\n\+    \\f\n\+    \\ENQ\EOT\t\STX\EOT\SOH\DC2\ETXX\b\SO\n\+    \\f\n\+    \\ENQ\EOT\t\STX\EOT\ETX\DC2\ETXX\DC1\DC2\n\+    \\v\n\+    \\EOT\EOT\t\STX\ENQ\DC2\ETXY\STX\SUB\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ENQ\ENQ\DC2\ETXY\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ENQ\SOH\DC2\ETXY\a\NAK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ENQ\ETX\DC2\ETXY\CAN\EM\n\+    \\v\n\+    \\EOT\EOT\t\STX\ACK\DC2\ETXZ\STX\CAN\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ACK\ENQ\DC2\ETXZ\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ACK\SOH\DC2\ETXZ\a\DC3\n\+    \\f\n\+    \\ENQ\EOT\t\STX\ACK\ETX\DC2\ETXZ\SYN\ETB\n\+    \=\n\+    \\EOT\EOT\t\STX\a\DC2\ETX]\STX\DC3\SUB0 XXX: Figure out what PostgreSQL calls `foo.id`\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\t\STX\a\ENQ\DC2\ETX]\STX\b\n\+    \\f\n\+    \\ENQ\EOT\t\STX\a\SOH\DC2\ETX]\t\SO\n\+    \\f\n\+    \\ENQ\EOT\t\STX\a\ETX\DC2\ETX]\DC1\DC2\n\+    \\v\n\+    \\EOT\EOT\t\STX\b\DC2\ETX^\STX\CAN\n\+    \\f\n\+    \\ENQ\EOT\t\STX\b\ACK\DC2\ETX^\STX\f\n\+    \\f\n\+    \\ENQ\EOT\t\STX\b\SOH\DC2\ETX^\r\DC2\n\+    \\f\n\+    \\ENQ\EOT\t\STX\b\ETX\DC2\ETX^\NAK\ETB\n\+    \\v\n\+    \\EOT\EOT\t\STX\t\DC2\ETX_\STX\SUB\n\+    \\f\n\+    \\ENQ\EOT\t\STX\t\ENQ\DC2\ETX_\STX\b\n\+    \\f\n\+    \\ENQ\EOT\t\STX\t\SOH\DC2\ETX_\t\DC4\n\+    \\f\n\+    \\ENQ\EOT\t\STX\t\ETX\DC2\ETX_\ETB\EM\n\+    \\v\n\+    \\EOT\EOT\t\STX\n\+    \\DC2\ETX`\STX\ETB\n\+    \\f\n\+    \\ENQ\EOT\t\STX\n\+    \\ACK\DC2\ETX`\STX\f\n\+    \\f\n\+    \\ENQ\EOT\t\STX\n\+    \\SOH\DC2\ETX`\r\DC1\n\+    \\f\n\+    \\ENQ\EOT\t\STX\n\+    \\ETX\DC2\ETX`\DC4\SYN\n\+    \\v\n\+    \\EOT\EOT\t\STX\v\DC2\ETXa\STX\SUB\n\+    \\f\n\+    \\ENQ\EOT\t\STX\v\ENQ\DC2\ETXa\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\v\SOH\DC2\ETXa\a\DC4\n\+    \\f\n\+    \\ENQ\EOT\t\STX\v\ETX\DC2\ETXa\ETB\EM\n\+    \\v\n\+    \\EOT\EOT\t\STX\f\DC2\ETXb\STX\RS\n\+    \\f\n\+    \\ENQ\EOT\t\STX\f\ACK\DC2\ETXb\STX\f\n\+    \\f\n\+    \\ENQ\EOT\t\STX\f\SOH\DC2\ETXb\r\CAN\n\+    \\f\n\+    \\ENQ\EOT\t\STX\f\ETX\DC2\ETXb\ESC\GS\n\+    \\v\n\+    \\EOT\EOT\t\STX\r\DC2\ETXc\STX\FS\n\+    \\f\n\+    \\ENQ\EOT\t\STX\r\ENQ\DC2\ETXc\STX\b\n\+    \\f\n\+    \\ENQ\EOT\t\STX\r\SOH\DC2\ETXc\t\SYN\n\+    \\f\n\+    \\ENQ\EOT\t\STX\r\ETX\DC2\ETXc\EM\ESC\n\+    \\v\n\+    \\EOT\EOT\t\STX\SO\DC2\ETXd\STX\NAK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SO\ENQ\DC2\ETXd\STX\ACK\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SO\SOH\DC2\ETXd\a\SI\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SO\ETX\DC2\ETXd\DC2\DC4\n\+    \\v\n\+    \\EOT\EOT\t\STX\SI\DC2\ETXe\STX\CAN\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SI\ENQ\DC2\ETXe\STX\a\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SI\SOH\DC2\ETXe\b\DC2\n\+    \\f\n\+    \\ENQ\EOT\t\STX\SI\ETX\DC2\ETXe\NAK\ETB\n\+    \\n\+    \\n\+    \\STX\EOT\n\+    \\DC2\EOTh\NULq\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\n\+    \\SOH\DC2\ETXh\b\r\n\+    \\v\n\+    \\EOT\EOT\n\+    \\STX\NUL\DC2\ETXi\STX'\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\NUL\ENQ\DC2\ETXi\STX\b\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\NUL\SOH\DC2\ETXi\t\r\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\NUL\ETX\DC2\ETXi\DLE\DC1\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\NUL\b\DC2\ETXi\DC2&\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\NUL\n\+    \\DC2\ETXi\DC3%\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\NUL\n\+    \\DC2\ETXi\US%\n\+    \\v\n\+    \\EOT\EOT\n\+    \\STX\SOH\DC2\ETXj\STX'\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\SOH\ENQ\DC2\ETXj\STX\b\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\SOH\SOH\DC2\ETXj\t\r\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\SOH\ETX\DC2\ETXj\DLE\DC1\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\SOH\b\DC2\ETXj\DC2&\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\SOH\n\+    \\DC2\ETXj\DC3%\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\SOH\n\+    \\DC2\ETXj\US%\n\+    \\v\n\+    \\EOT\EOT\n\+    \\STX\STX\DC2\ETXk\STX%\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\STX\ENQ\DC2\ETXk\STX\b\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\STX\SOH\DC2\ETXk\t\f\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\STX\ETX\DC2\ETXk\SI\DLE\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\STX\b\DC2\ETXk\DC1$\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\STX\n\+    \\DC2\ETXk\DC2#\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\STX\n\+    \\DC2\ETXk\RS#\n\+    \\v\n\+    \\EOT\EOT\n\+    \\STX\ETX\DC2\ETXl\STX6\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ETX\EOT\DC2\ETXl\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ETX\ACK\DC2\ETXl\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ETX\SOH\DC2\ETXl\DC2\EM\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ETX\ETX\DC2\ETXl\FS\GS\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ETX\b\DC2\ETXl\RS5\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ETX\n\+    \\DC2\ETXl\US4\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ETX\n\+    \\DC2\ETXl+4\n\+    \\v\n\+    \\EOT\EOT\n\+    \\STX\EOT\DC2\ETXm\STX;\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\EOT\EOT\DC2\ETXm\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\EOT\ACK\DC2\ETXm\v\DC4\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\EOT\SOH\DC2\ETXm\NAK\ESC\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\EOT\ETX\DC2\ETXm\RS\US\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\EOT\b\DC2\ETXm :\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\EOT\n\+    \\DC2\ETXm!9\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\EOT\n\+    \\DC2\ETXm-9\n\+    \\v\n\+    \\EOT\EOT\n\+    \\STX\ENQ\DC2\ETXn\STX8\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ENQ\EOT\DC2\ETXn\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ENQ\ENQ\DC2\ETXn\v\DC1\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ENQ\SOH\DC2\ETXn\DC2\SUB\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ENQ\ETX\DC2\ETXn\GS\RS\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ENQ\b\DC2\ETXn\US7\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ENQ\n\+    \\DC2\ETXn 6\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ENQ\n\+    \\DC2\ETXn,6\n\+    \\v\n\+    \\EOT\EOT\n\+    \\STX\ACK\DC2\ETXo\STX/\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ACK\ENQ\DC2\ETXo\STX\b\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ACK\SOH\DC2\ETXo\t\DC1\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ACK\ETX\DC2\ETXo\DC4\NAK\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ACK\b\DC2\ETXo\SYN.\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ACK\n\+    \\DC2\ETXo\ETB-\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\ACK\n\+    \\DC2\ETXo#-\n\+    \\v\n\+    \\EOT\EOT\n\+    \\STX\a\DC2\ETXp\STXE\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\a\ACK\DC2\ETXp\STX\f\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\a\SOH\DC2\ETXp\r\RS\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\a\ETX\DC2\ETXp!\"\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\a\b\DC2\ETXp#D\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\a\n\+    \\DC2\ETXp$C\n\+    \\f\n\+    \\ENQ\EOT\n\+    \\STX\a\n\+    \\DC2\ETXp0C\n\+    \\n\+    \\n\+    \\STX\EOT\v\DC2\EOTs\NULv\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\v\SOH\DC2\ETXs\b\DC1\n\+    \\v\n\+    \\EOT\EOT\v\STX\NUL\DC2\ETXt\STX*\n\+    \\f\n\+    \\ENQ\EOT\v\STX\NUL\ENQ\DC2\ETXt\STX\a\n\+    \\f\n\+    \\ENQ\EOT\v\STX\NUL\SOH\DC2\ETXt\b\SO\n\+    \\f\n\+    \\ENQ\EOT\v\STX\NUL\ETX\DC2\ETXt\DC1\DC2\n\+    \\f\n\+    \\ENQ\EOT\v\STX\NUL\b\DC2\ETXt\DC3)\n\+    \\f\n\+    \\ENQ\EOT\v\STX\NUL\n\+    \\DC2\ETXt\DC4(\n\+    \\f\n\+    \\ENQ\EOT\v\STX\NUL\n\+    \\DC2\ETXt (\n\+    \\v\n\+    \\EOT\EOT\v\STX\SOH\DC2\ETXu\STX+\n\+    \\f\n\+    \\ENQ\EOT\v\STX\SOH\ACK\DC2\ETXu\STX\b\n\+    \\f\n\+    \\ENQ\EOT\v\STX\SOH\SOH\DC2\ETXu\t\SI\n\+    \\f\n\+    \\ENQ\EOT\v\STX\SOH\ETX\DC2\ETXu\DC2\DC3\n\+    \\f\n\+    \\ENQ\EOT\v\STX\SOH\b\DC2\ETXu\DC4*\n\+    \\f\n\+    \\ENQ\EOT\v\STX\SOH\n\+    \\DC2\ETXu\NAK)\n\+    \\f\n\+    \\ENQ\EOT\v\STX\SOH\n\+    \\DC2\ETXu!)\n\+    \\n\+    \\n\+    \\STX\EOT\f\DC2\EOTx\NUL\DEL\SOH\n\+    \\n\+    \\n\+    \\ETX\EOT\f\SOH\DC2\ETXx\b\ETB\n\+    \\v\n\+    \\EOT\EOT\f\STX\NUL\DC2\ETXy\STX1\n\+    \\f\n\+    \\ENQ\EOT\f\STX\NUL\ACK\DC2\ETXy\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\f\STX\NUL\SOH\DC2\ETXy\v\DC3\n\+    \\f\n\+    \\ENQ\EOT\f\STX\NUL\ETX\DC2\ETXy\SYN\ETB\n\+    \\f\n\+    \\ENQ\EOT\f\STX\NUL\b\DC2\ETXy\CAN0\n\+    \\f\n\+    \\ENQ\EOT\f\STX\NUL\n\+    \\DC2\ETXy\EM/\n\+    \\f\n\+    \\ENQ\EOT\f\STX\NUL\n\+    \\DC2\ETXy%/\n\+    \\v\n\+    \\EOT\EOT\f\STX\SOH\DC2\ETXz\STX.\n\+    \\f\n\+    \\ENQ\EOT\f\STX\SOH\ACK\DC2\ETXz\STX\t\n\+    \\f\n\+    \\ENQ\EOT\f\STX\SOH\SOH\DC2\ETXz\n\+    \\DC1\n\+    \\f\n\+    \\ENQ\EOT\f\STX\SOH\ETX\DC2\ETXz\DC4\NAK\n\+    \\f\n\+    \\ENQ\EOT\f\STX\SOH\b\DC2\ETXz\SYN-\n\+    \\f\n\+    \\ENQ\EOT\f\STX\SOH\n\+    \\DC2\ETXz\ETB,\n\+    \\f\n\+    \\ENQ\EOT\f\STX\SOH\n\+    \\DC2\ETXz#,\n\+    \\v\n\+    \\EOT\EOT\f\STX\STX\DC2\ETX{\STX5\n\+    \\f\n\+    \\ENQ\EOT\f\STX\STX\EOT\DC2\ETX{\STX\n\+    \\n\+    \\f\n\+    \\ENQ\EOT\f\STX\STX\ACK\DC2\ETX{\v\DLE\n\+    \\f\n\+    \\ENQ\EOT\f\STX\STX\SOH\DC2\ETX{\DC1\CAN\n\+    \\f\n\+    \\ENQ\EOT\f\STX\STX\ETX\DC2\ETX{\ESC\FS\n\+    \\f\n\+    \\ENQ\EOT\f\STX\STX\b\DC2\ETX{\GS4\n\+    \\f\n\+    \\ENQ\EOT\f\STX\STX\n\+    \\DC2\ETX{\RS3\n\+    \\f\n\+    \\ENQ\EOT\f\STX\STX\n\+    \\DC2\ETX{*3\n\+    \\v\n\+    \\EOT\EOT\f\STX\ETX\DC2\ETX|\STX7\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ETX\ENQ\DC2\ETX|\STX\b\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ETX\SOH\DC2\ETX|\t\NAK\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ETX\ETX\DC2\ETX|\CAN\EM\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ETX\b\DC2\ETX|\SUB6\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ETX\n\+    \\DC2\ETX|\ESC5\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ETX\n\+    \\DC2\ETX|'5\n\+    \\v\n\+    \\EOT\EOT\f\STX\EOT\DC2\ETX}\STX:\n\+    \\f\n\+    \\ENQ\EOT\f\STX\EOT\ENQ\DC2\ETX}\STX\a\n\+    \\f\n\+    \\ENQ\EOT\f\STX\EOT\SOH\DC2\ETX}\b\SYN\n\+    \\f\n\+    \\ENQ\EOT\f\STX\EOT\ETX\DC2\ETX}\EM\SUB\n\+    \\f\n\+    \\ENQ\EOT\f\STX\EOT\b\DC2\ETX}\ESC9\n\+    \\f\n\+    \\ENQ\EOT\f\STX\EOT\n\+    \\DC2\ETX}\FS8\n\+    \\f\n\+    \\ENQ\EOT\f\STX\EOT\n\+    \\DC2\ETX}(8\n\+    \\v\n\+    \\EOT\EOT\f\STX\ENQ\DC2\ETX~\STX:\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ENQ\ENQ\DC2\ETX~\STX\a\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ENQ\SOH\DC2\ETX~\b\SYN\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ENQ\ETX\DC2\ETX~\EM\SUB\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ENQ\b\DC2\ETX~\ESC9\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ENQ\n\+    \\DC2\ETX~\FS8\n\+    \\f\n\+    \\ENQ\EOT\f\STX\ENQ\n\+    \\DC2\ETX~(8\n\+    \\f\n\+    \\STX\EOT\r\DC2\ACK\129\SOH\NUL\131\SOH\SOH\n\+    \\v\n\+    \\ETX\EOT\r\SOH\DC2\EOT\129\SOH\b\CAN\n\+    \\f\n\+    \\EOT\EOT\r\STX\NUL\DC2\EOT\130\SOH\STX0\n\+    \\r\n\+    \\ENQ\EOT\r\STX\NUL\EOT\DC2\EOT\130\SOH\STX\n\+    \\n\+    \\r\n\+    \\ENQ\EOT\r\STX\NUL\ACK\DC2\EOT\130\SOH\v\SI\n\+    \\r\n\+    \\ENQ\EOT\r\STX\NUL\SOH\DC2\EOT\130\SOH\DLE\NAK\n\+    \\r\n\+    \\ENQ\EOT\r\STX\NUL\ETX\DC2\EOT\130\SOH\CAN\EM\n\+    \\r\n\+    \\ENQ\EOT\r\STX\NUL\b\DC2\EOT\130\SOH\SUB/\n\+    \\r\n\+    \\ENQ\EOT\r\STX\NUL\n\+    \\DC2\EOT\130\SOH\ESC.\n\+    \\r\n\+    \\ENQ\EOT\r\STX\NUL\n\+    \\DC2\EOT\130\SOH'.b\ACKproto3"
+ sqlc-hs-protos/Proto/Protos/Codegen_Fields.hs view
@@ -0,0 +1,446 @@+{- This file was auto-generated from protos/codegen.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}+{-# OPTIONS_GHC -Wno-unused-imports#-}+{-# OPTIONS_GHC -Wno-duplicate-exports#-}+{-# OPTIONS_GHC -Wno-dodgy-exports#-}+module Proto.Protos.Codegen_Fields where+import qualified Data.ProtoLens.Runtime.Prelude as Prelude+import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int+import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid+import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word+import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum+import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2+import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text+import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map+import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString+import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8+import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding+import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector+import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic+import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed+import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read+arrayDims ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "arrayDims" a) =>+  Lens.Family2.LensLike' f s a+arrayDims = Data.ProtoLens.Field.field @"arrayDims"+catalog ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "catalog" a) =>+  Lens.Family2.LensLike' f s a+catalog = Data.ProtoLens.Field.field @"catalog"+cmd ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "cmd" a) =>+  Lens.Family2.LensLike' f s a+cmd = Data.ProtoLens.Field.field @"cmd"+codegen ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "codegen" a) =>+  Lens.Family2.LensLike' f s a+codegen = Data.ProtoLens.Field.field @"codegen"+column ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "column" a) =>+  Lens.Family2.LensLike' f s a+column = Data.ProtoLens.Field.field @"column"+columns ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "columns" a) =>+  Lens.Family2.LensLike' f s a+columns = Data.ProtoLens.Field.field @"columns"+comment ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "comment" a) =>+  Lens.Family2.LensLike' f s a+comment = Data.ProtoLens.Field.field @"comment"+comments ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "comments" a) =>+  Lens.Family2.LensLike' f s a+comments = Data.ProtoLens.Field.field @"comments"+compositeTypes ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "compositeTypes" a) =>+  Lens.Family2.LensLike' f s a+compositeTypes = Data.ProtoLens.Field.field @"compositeTypes"+contents ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "contents" a) =>+  Lens.Family2.LensLike' f s a+contents = Data.ProtoLens.Field.field @"contents"+defaultSchema ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "defaultSchema" a) =>+  Lens.Family2.LensLike' f s a+defaultSchema = Data.ProtoLens.Field.field @"defaultSchema"+embedTable ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "embedTable" a) =>+  Lens.Family2.LensLike' f s a+embedTable = Data.ProtoLens.Field.field @"embedTable"+engine ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "engine" a) =>+  Lens.Family2.LensLike' f s a+engine = Data.ProtoLens.Field.field @"engine"+enums ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "enums" a) =>+  Lens.Family2.LensLike' f s a+enums = Data.ProtoLens.Field.field @"enums"+env ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "env" a) =>+  Lens.Family2.LensLike' f s a+env = Data.ProtoLens.Field.field @"env"+filename ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "filename" a) =>+  Lens.Family2.LensLike' f s a+filename = Data.ProtoLens.Field.field @"filename"+files ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "files" a) =>+  Lens.Family2.LensLike' f s a+files = Data.ProtoLens.Field.field @"files"+globalOptions ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "globalOptions" a) =>+  Lens.Family2.LensLike' f s a+globalOptions = Data.ProtoLens.Field.field @"globalOptions"+insertIntoTable ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "insertIntoTable" a) =>+  Lens.Family2.LensLike' f s a+insertIntoTable = Data.ProtoLens.Field.field @"insertIntoTable"+isArray ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "isArray" a) =>+  Lens.Family2.LensLike' f s a+isArray = Data.ProtoLens.Field.field @"isArray"+isFuncCall ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "isFuncCall" a) =>+  Lens.Family2.LensLike' f s a+isFuncCall = Data.ProtoLens.Field.field @"isFuncCall"+isNamedParam ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "isNamedParam" a) =>+  Lens.Family2.LensLike' f s a+isNamedParam = Data.ProtoLens.Field.field @"isNamedParam"+isSqlcSlice ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "isSqlcSlice" a) =>+  Lens.Family2.LensLike' f s a+isSqlcSlice = Data.ProtoLens.Field.field @"isSqlcSlice"+length ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "length" a) =>+  Lens.Family2.LensLike' f s a+length = Data.ProtoLens.Field.field @"length"+maybe'catalog ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'catalog" a) =>+  Lens.Family2.LensLike' f s a+maybe'catalog = Data.ProtoLens.Field.field @"maybe'catalog"+maybe'codegen ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'codegen" a) =>+  Lens.Family2.LensLike' f s a+maybe'codegen = Data.ProtoLens.Field.field @"maybe'codegen"+maybe'column ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'column" a) =>+  Lens.Family2.LensLike' f s a+maybe'column = Data.ProtoLens.Field.field @"maybe'column"+maybe'embedTable ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'embedTable" a) =>+  Lens.Family2.LensLike' f s a+maybe'embedTable = Data.ProtoLens.Field.field @"maybe'embedTable"+maybe'insertIntoTable ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'insertIntoTable" a) =>+  Lens.Family2.LensLike' f s a+maybe'insertIntoTable+  = Data.ProtoLens.Field.field @"maybe'insertIntoTable"+maybe'process ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'process" a) =>+  Lens.Family2.LensLike' f s a+maybe'process = Data.ProtoLens.Field.field @"maybe'process"+maybe'rel ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'rel" a) =>+  Lens.Family2.LensLike' f s a+maybe'rel = Data.ProtoLens.Field.field @"maybe'rel"+maybe'settings ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'settings" a) =>+  Lens.Family2.LensLike' f s a+maybe'settings = Data.ProtoLens.Field.field @"maybe'settings"+maybe'table ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'table" a) =>+  Lens.Family2.LensLike' f s a+maybe'table = Data.ProtoLens.Field.field @"maybe'table"+maybe'type' ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'type'" a) =>+  Lens.Family2.LensLike' f s a+maybe'type' = Data.ProtoLens.Field.field @"maybe'type'"+maybe'wasm ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "maybe'wasm" a) =>+  Lens.Family2.LensLike' f s a+maybe'wasm = Data.ProtoLens.Field.field @"maybe'wasm"+name ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "name" a) =>+  Lens.Family2.LensLike' f s a+name = Data.ProtoLens.Field.field @"name"+notNull ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "notNull" a) =>+  Lens.Family2.LensLike' f s a+notNull = Data.ProtoLens.Field.field @"notNull"+number ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "number" a) =>+  Lens.Family2.LensLike' f s a+number = Data.ProtoLens.Field.field @"number"+options ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "options" a) =>+  Lens.Family2.LensLike' f s a+options = Data.ProtoLens.Field.field @"options"+originalName ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "originalName" a) =>+  Lens.Family2.LensLike' f s a+originalName = Data.ProtoLens.Field.field @"originalName"+out ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "out" a) =>+  Lens.Family2.LensLike' f s a+out = Data.ProtoLens.Field.field @"out"+params ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "params" a) =>+  Lens.Family2.LensLike' f s a+params = Data.ProtoLens.Field.field @"params"+plugin ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "plugin" a) =>+  Lens.Family2.LensLike' f s a+plugin = Data.ProtoLens.Field.field @"plugin"+pluginOptions ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "pluginOptions" a) =>+  Lens.Family2.LensLike' f s a+pluginOptions = Data.ProtoLens.Field.field @"pluginOptions"+process ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "process" a) =>+  Lens.Family2.LensLike' f s a+process = Data.ProtoLens.Field.field @"process"+queries ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "queries" a) =>+  Lens.Family2.LensLike' f s a+queries = Data.ProtoLens.Field.field @"queries"+rel ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "rel" a) =>+  Lens.Family2.LensLike' f s a+rel = Data.ProtoLens.Field.field @"rel"+schema ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "schema" a) =>+  Lens.Family2.LensLike' f s a+schema = Data.ProtoLens.Field.field @"schema"+schemas ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "schemas" a) =>+  Lens.Family2.LensLike' f s a+schemas = Data.ProtoLens.Field.field @"schemas"+scope ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "scope" a) =>+  Lens.Family2.LensLike' f s a+scope = Data.ProtoLens.Field.field @"scope"+settings ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "settings" a) =>+  Lens.Family2.LensLike' f s a+settings = Data.ProtoLens.Field.field @"settings"+sha256 ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "sha256" a) =>+  Lens.Family2.LensLike' f s a+sha256 = Data.ProtoLens.Field.field @"sha256"+sqlcVersion ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "sqlcVersion" a) =>+  Lens.Family2.LensLike' f s a+sqlcVersion = Data.ProtoLens.Field.field @"sqlcVersion"+table ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "table" a) =>+  Lens.Family2.LensLike' f s a+table = Data.ProtoLens.Field.field @"table"+tableAlias ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "tableAlias" a) =>+  Lens.Family2.LensLike' f s a+tableAlias = Data.ProtoLens.Field.field @"tableAlias"+tables ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "tables" a) =>+  Lens.Family2.LensLike' f s a+tables = Data.ProtoLens.Field.field @"tables"+text ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "text" a) =>+  Lens.Family2.LensLike' f s a+text = Data.ProtoLens.Field.field @"text"+type' ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "type'" a) =>+  Lens.Family2.LensLike' f s a+type' = Data.ProtoLens.Field.field @"type'"+unsigned ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "unsigned" a) =>+  Lens.Family2.LensLike' f s a+unsigned = Data.ProtoLens.Field.field @"unsigned"+url ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "url" a) =>+  Lens.Family2.LensLike' f s a+url = Data.ProtoLens.Field.field @"url"+vals ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "vals" a) =>+  Lens.Family2.LensLike' f s a+vals = Data.ProtoLens.Field.field @"vals"+vec'columns ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'columns" a) =>+  Lens.Family2.LensLike' f s a+vec'columns = Data.ProtoLens.Field.field @"vec'columns"+vec'comments ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'comments" a) =>+  Lens.Family2.LensLike' f s a+vec'comments = Data.ProtoLens.Field.field @"vec'comments"+vec'compositeTypes ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'compositeTypes" a) =>+  Lens.Family2.LensLike' f s a+vec'compositeTypes+  = Data.ProtoLens.Field.field @"vec'compositeTypes"+vec'enums ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'enums" a) =>+  Lens.Family2.LensLike' f s a+vec'enums = Data.ProtoLens.Field.field @"vec'enums"+vec'env ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "vec'env" a) =>+  Lens.Family2.LensLike' f s a+vec'env = Data.ProtoLens.Field.field @"vec'env"+vec'files ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'files" a) =>+  Lens.Family2.LensLike' f s a+vec'files = Data.ProtoLens.Field.field @"vec'files"+vec'params ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'params" a) =>+  Lens.Family2.LensLike' f s a+vec'params = Data.ProtoLens.Field.field @"vec'params"+vec'queries ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'queries" a) =>+  Lens.Family2.LensLike' f s a+vec'queries = Data.ProtoLens.Field.field @"vec'queries"+vec'schema ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'schema" a) =>+  Lens.Family2.LensLike' f s a+vec'schema = Data.ProtoLens.Field.field @"vec'schema"+vec'schemas ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'schemas" a) =>+  Lens.Family2.LensLike' f s a+vec'schemas = Data.ProtoLens.Field.field @"vec'schemas"+vec'tables ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'tables" a) =>+  Lens.Family2.LensLike' f s a+vec'tables = Data.ProtoLens.Field.field @"vec'tables"+vec'vals ::+  forall f s a.+  (Prelude.Functor f,+   Data.ProtoLens.Field.HasField s "vec'vals" a) =>+  Lens.Family2.LensLike' f s a+vec'vals = Data.ProtoLens.Field.field @"vec'vals"+version ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "version" a) =>+  Lens.Family2.LensLike' f s a+version = Data.ProtoLens.Field.field @"version"+wasm ::+  forall f s a.+  (Prelude.Functor f, Data.ProtoLens.Field.HasField s "wasm" a) =>+  Lens.Family2.LensLike' f s a+wasm = Data.ProtoLens.Field.field @"wasm"
+ sqlc-hs.cabal view
@@ -0,0 +1,130 @@+cabal-version:      3.4+name:               sqlc-hs+version:            0.1.0.0++-- synopsis:+-- description:+license:            Apache-2.0+license-file:       LICENSE+author:             Alex Hansen+maintainer:         alex.hansen@gmail.com+homepage:           https://github.com/alexbiehl/sqlc-hs+bug-reports:        https://github.com/alexbiehl/sqlc-hs/issues+category:           Development+synopsis:+  Generate type-safe Haskell code from SQL via https://github.com/sqlc-dev/sqlc.++-- copyright:+build-type:         Simple+extra-doc-files:    CHANGELOG.md+extra-source-files:+  templates/internal.mysql.hs.jinja+  templates/internal.postgresql.hs.jinja+  templates/internal.sqlite.hs.jinja+  templates/package.cabal.jinja+  templates/query.hs.jinja+  templates/toplevel.hs.jinja+  test/golden/**/*.cabal+  test/golden/**/*.hs+  test/golden/**/*.input++source-repository head+  type:     git+  location: git@github.com:alexbiehl/sqlc-hs.git++common stuff+  ghc-options:        -Wall -Wno-name-shadowing+  build-depends:+    , base                     <5.0+    , sqlc-hs:sqlc-hs-prelude++  mixins:+    base hiding (Prelude),+    sqlc-hs:sqlc-hs-prelude (Sqlc.Hs.Prelude as Prelude)++  default-extensions:+    DerivingStrategies+    DuplicateRecordFields+    OverloadedLabels+    OverloadedRecordDot+    OverloadedStrings++library sqlc-hs-prelude+  visibility:       private+  exposed-modules:  Sqlc.Hs.Prelude+  build-depends:+    , base    <5.0+    , relude++  hs-source-dirs:   sqlc-hs-prelude+  default-language: GHC2021++library sqlc-hs-protos+  visibility:       private+  exposed-modules:+    Proto.Protos.Codegen+    Proto.Protos.Codegen_Fields++  build-depends:    proto-lens-runtime+  hs-source-dirs:   sqlc-hs-protos+  default-language: GHC2021++library+  import:           stuff+  exposed-modules:+    Sqlc.Hs.Codegen+    Sqlc.Hs.Config+    Sqlc.Hs.Main+    Sqlc.Hs.Resolve++  build-depends:+    , aeson+    , bytestring+    , directory+    , ede+    , file-embed+    , filepath+    , mtl+    , proto-lens+    , proto-lens-runtime+    , sqlc-hs:sqlc-hs-protos+    , text+    , vector++  hs-source-dirs:   src+  default-language: GHC2021++executable sqlc-hs+  import:           stuff+  main-is:          Main.hs++  -- other-modules:+  -- other-extensions:+  build-depends:    sqlc-hs+  hs-source-dirs:   app+  default-language: GHC2021++test-suite sqlc-hs-test+  import:             stuff+  default-language:   GHC2021+  build-depends:+    , bytestring+    , directory+    , filepath+    , process+    , process-extras+    , proto-lens+    , sqlc-hs:{sqlc-hs, sqlc-hs-protos}+    , tasty+    , tasty-golden+    , temporary++  build-tool-depends: tasty-discover:tasty-discover+  build-tool-depends: sqlc-hs:sqlc-hs+  other-modules:      Test.Sqlc.Hs.Golden++  -- other-extensions:+  type:               exitcode-stdio-1.0+  hs-source-dirs:     test+  main-is:            Driver.hs+  build-depends:      sqlc-hs
+ src/Sqlc/Hs/Codegen.hs view
@@ -0,0 +1,380 @@+{-# LANGUAGE TemplateHaskell #-}++module Sqlc.Hs.Codegen+  ( File (..),+    codegen,+  )+where++import Data.FileEmbed qualified+import Data.ProtoLens.Labels ()+import Proto.Protos.Codegen qualified+import Sqlc.Hs.Config (Config (..), HaskellType (..))+import Sqlc.Hs.Resolve+  ( ResolveName,+    ResolveType,+    ResolvedNames (..),+    determineInternalModule,+    determineTopLevelModule,+    newResolveType,+    resolveQueryName,+  )+import System.Exit qualified+import System.IO qualified+import Text.EDE qualified++-- | 'File' represents a logical file in the file in the files+-- we generate.+data File = File+  { name :: Text,+    contents :: ByteString+  }++-- | Similar to a file but representing exactly one Haskell module.+data Module = Module+  { -- | Module name, e.g. Sqlc.Hs.Codegen+    name :: Text,+    -- | File name, e.g. Sqlc/Hs/Codegen.hs+    fileName :: Text,+    -- | The types that this module imports.+    importedTypes :: [HaskellType],+    -- | The contents in bytes. This is valid Haskell code.+    contents :: ByteString+  }++codegen :: Config -> Proto.Protos.Codegen.GenerateRequest -> IO [File]+codegen config generateRequest = do+  modules <-+    traverse+      ( codegenQuery+          (generateRequest ^. #settings . #engine)+          internalName+          resolveName+          resolveType+      )+      (toList (generateRequest ^. #queries))++  toplevelModule <-+    codegenToplevel toplevelName internalName modules++  internalModule <-+    codegenInternal (generateRequest ^. #settings . #engine) internalName++  let generatedModules =+        toplevelModule : internalModule : modules++  cabalPackageFile <-+    codegenCabalFile config generatedModules++  pure (cabalPackageFile <> map moduleToFile generatedModules)+  where+    resolveType =+      newResolveType config (generateRequest ^. #settings . #engine)++    resolveName =+      resolveQueryName config.haskellModulePrefix++    toplevelName =+      determineTopLevelModule config.haskellModulePrefix++    internalName =+      determineInternalModule config.haskellModulePrefix++moduleToFile :: Module -> File+moduleToFile module_ =+  File+    { name = module_.fileName,+      contents = module_.contents+    }++codegenToplevel ::+  -- | ResolvedName of the toplevel module name+  ResolvedNames ->+  -- | ResolvedName of the internal module name+  ResolvedNames ->+  [Module] ->+  IO Module+codegenToplevel toplevel internal modulesToReexport = do+  let context =+        Text.EDE.fromPairs+          [ "moduleName" Text.EDE..= toplevel.toHaskellModuleName,+            "internalModuleName" Text.EDE..= internal.toHaskellModuleName,+            "modules" Text.EDE..= fmap (.name) modulesToReexport+          ]++  pure+    Module+      { name = toplevel.toHaskellModuleName,+        fileName = toplevel.toHaskellFileName,+        importedTypes = [],+        contents = contents context+      }+  where+    contents context =+      case Text.EDE.render toplevelTemplate context of+        Text.EDE.Success output ->+          encodeUtf8 (toStrict @LText @Text output)+        Text.EDE.Failure errorDoc ->+          error (show errorDoc)++codegenInternal ::+  Text ->+  -- | ResolvedName of the internal module name+  ResolvedNames ->+  IO Module+codegenInternal engine internal = do+  let context =+        Text.EDE.fromPairs+          [ "moduleName" Text.EDE..= internal.toHaskellModuleName+          ]++  pure+    Module+      { name = internal.toHaskellModuleName,+        fileName = internal.toHaskellFileName,+        importedTypes =+          [HaskellType {package = Just "base", module' = Nothing, name = Nothing}]+            <> dependencies,+        contents = contents context+      }+  where+    (template, dependencies) =+      case engine of+        "sqlite" ->+          ( internalSqliteTemplate,+            [ HaskellType {package = Just "sqlite-simple", module' = Just "Database.SQLite.Simple", name = Just "ToRow"},+              HaskellType {package = Just "sqlite-simple", module' = Just "Database.SQLite.Simple", name = Just "FromRow"},+              HaskellType {package = Just "vector", module' = Just "Data.Vector", name = Just "Vector"}+            ]+          )+        "mysql" ->+          ( internalMysqlTemplate,+            [ HaskellType {package = Just "mysql-simple", module' = Just "Database.MySQL.Simple", name = Just "ToRow"},+              HaskellType {package = Just "mysql-simple", module' = Just "Database.MySQL.Simple", name = Just "FromRow"}+            ]+          )+        _ ->+          ( internalPostgresTemplate,+            [ HaskellType {package = Just "postgresql-simple", module' = Just "Database.PostgreSQL.Simple", name = Just "ToRow"},+              HaskellType {package = Just "postgresql-simple", module' = Just "Database.PostgreSQL.Simple", name = Just "FromRow"},+              HaskellType {package = Just "vector", module' = Just "Data.Vector", name = Just "Vector"}+            ]+          )++    contents context =+      case Text.EDE.render template context of+        Text.EDE.Success output ->+          encodeUtf8 (toStrict @LText @Text output)+        Text.EDE.Failure errorDoc ->+          error (show errorDoc)++codegenCabalFile ::+  Config ->+  [Module] ->+  IO [File]+codegenCabalFile config generatedModules+  | Just packageName <- config.cabalPackageName = do+      let context =+            Text.EDE.fromPairs+              [ "packageName" Text.EDE..= packageName,+                "packageVersion" Text.EDE..= config.cabalPackageVersion,+                "buildDepends" Text.EDE..= buildDepends,+                "exposedModules" Text.EDE..= exposedModules+              ]+      pure+        [ File+            { name = packageName <> ".cabal",+              contents = contents context+            }+        ]+  | otherwise =+      -- No cabal file requested+      pure []+  where+    contents context =+      case Text.EDE.render cabalTemplate context of+        Text.EDE.Success output ->+          encodeUtf8 (toStrict @LText @Text output)+        Text.EDE.Failure errorDoc ->+          error (show errorDoc)++    buildDepends :: [Text]+    buildDepends =+      sort $+        ordNub $+          mapMaybe+            (.package)+            (concatMap (.importedTypes) generatedModules)++    exposedModules :: [Text]+    exposedModules =+      sort $+        map+          (.name)+          generatedModules++-- | Generate a file for a single query. This returns the resolved 'HaskellType's so+-- that we can generate the necessary build-depends for the cabal file.+codegenQuery ::+  -- | Engine, if defined+  Text ->+  -- | ResolvedName of the internal module name+  ResolvedNames ->+  ResolveName ->+  ResolveType ->+  Proto.Protos.Codegen.Query ->+  IO Module+codegenQuery engine internalModule resolveName resolveType query = do+  let resolvedName =+        resolveName (query ^. #name)++  parameterColumns <-+    forM (query ^. #params) $ \parameter -> do+      whenNothing (resolveType (parameter ^. #column)) $+        couldNotResolveType (parameter ^. #column)++  resultColumns <-+    forM (query ^. #columns) $ \column -> do+      whenNothing (resolveType column) $+        couldNotResolveType column++  let importedTypes :: [HaskellType]+      importedTypes =+        foldMap (toList . snd) parameterColumns+          <> foldMap (toList . snd) resultColumns++      -- Modules that the query module needs to import.+      imports :: [Text]+      imports =+        ordNub $+          mapMaybe (.module') importedTypes++      context =+        Text.EDE.fromPairs+          [ "generatePostgresql" Text.EDE..= (engine == "postgresql"),+            "generateSqlite" Text.EDE..= (engine == "sqlite"),+            "generateMysql" Text.EDE..= (engine == "mysql"),+            "sourceFile" Text.EDE..= (query ^. #filename),+            "moduleName" Text.EDE..= resolvedName.toHaskellModuleName,+            "moduleImports" Text.EDE..= imports,+            "internalModuleName" Text.EDE..= internalModule.toHaskellModuleName,+            "command" Text.EDE..= (query ^. #cmd),+            "haskellQueryName" Text.EDE..= resolvedName.toQueryDeclarationName,+            "haskellParamsName" Text.EDE..= resolvedName.toParamsConstructorDeclarationName,+            "haskellResultName" Text.EDE..= resolvedName.toResultConstructorDeclarationName,+            "escapedQueryName" Text.EDE..= show @Text (query ^. #name),+            "escapedCommand" Text.EDE..= show @Text (query ^. #cmd),+            "escapedSql" Text.EDE..= show @Text (query ^. #text),+            "parameterColumns" Text.EDE..= fmap toParameterColumn parameterColumns,+            "resultColumns" Text.EDE..= fmap toResultColumn resultColumns+          ]++  pure+    Module+      { name = resolvedName.toHaskellModuleName,+        fileName = resolvedName.toHaskellFileName,+        importedTypes,+        contents = contents context+      }+  where+    contents context =+      case Text.EDE.render queryTemplate context of+        Text.EDE.Success output ->+          encodeUtf8 (toStrict @LText @Text output)+        Text.EDE.Failure errorDoc ->+          error (show errorDoc)++    toParameterColumn (column, haskellType :| _) =+      Text.EDE.fromPairs+        [ "name" Text.EDE..= (resolveName (column ^. #name)).toFieldName,+          "type" Text.EDE..= encodeColumnType haskellType+        ]++    toResultColumn (column, haskellType :| _) =+      Text.EDE.fromPairs+        [ "name" Text.EDE..= (resolveName (column ^. #name)).toFieldName,+          "type" Text.EDE..= encodeColumnType haskellType+        ]++    encodeColumnType haskellType =+      haskellType.name++    couldNotResolveType column = do+      System.IO.hPutStrLn System.IO.stderr $+        "Could not resolve type "+          <> show (column ^. #type')+          <> " for column "+          <> show (column ^. #name)+      System.Exit.exitWith (System.Exit.ExitFailure 1)++toplevelTemplate :: Text.EDE.Template+toplevelTemplate =+  case Text.EDE.parse template of+    Text.EDE.Success template ->+      template+    Text.EDE.Failure errorDoc ->+      error (show errorDoc)+  where+    template :: ByteString+    template =+      $(Data.FileEmbed.embedFile "templates/toplevel.hs.jinja")++queryTemplate :: Text.EDE.Template+queryTemplate =+  case Text.EDE.parse template of+    Text.EDE.Success template ->+      template+    Text.EDE.Failure errorDoc ->+      error (show errorDoc)+  where+    template :: ByteString+    template =+      $(Data.FileEmbed.embedFile "templates/query.hs.jinja")++internalPostgresTemplate :: Text.EDE.Template+internalPostgresTemplate =+  case Text.EDE.parse template of+    Text.EDE.Success template ->+      template+    Text.EDE.Failure errorDoc ->+      error (show errorDoc)+  where+    template :: ByteString+    template =+      $(Data.FileEmbed.embedFile "templates/internal.postgresql.hs.jinja")++internalMysqlTemplate :: Text.EDE.Template+internalMysqlTemplate =+  case Text.EDE.parse template of+    Text.EDE.Success template ->+      template+    Text.EDE.Failure errorDoc ->+      error (show errorDoc)+  where+    template :: ByteString+    template =+      $(Data.FileEmbed.embedFile "templates/internal.mysql.hs.jinja")++internalSqliteTemplate :: Text.EDE.Template+internalSqliteTemplate =+  case Text.EDE.parse template of+    Text.EDE.Success template ->+      template+    Text.EDE.Failure errorDoc ->+      error (show errorDoc)+  where+    template :: ByteString+    template =+      $(Data.FileEmbed.embedFile "templates/internal.sqlite.hs.jinja")++cabalTemplate :: Text.EDE.Template+cabalTemplate =+  case Text.EDE.parse template of+    Text.EDE.Success template ->+      template+    Text.EDE.Failure errorDoc ->+      error (show errorDoc)+  where+    template :: ByteString+    template =+      $(Data.FileEmbed.embedFile "templates/package.cabal.jinja")
+ src/Sqlc/Hs/Config.hs view
@@ -0,0 +1,125 @@+module Sqlc.Hs.Config+  ( Config (..),+    Override (..),+    HaskellType (..),+    parseConfig,+    defaultConfig,+  )+where++import Data.Aeson+  ( FromJSON (..),+    eitherDecodeStrict,+    withObject,+    (.!=),+    (.:),+    (.:?),+  )+import Data.Vector (Vector)++-- | Serves as both, global and per query configuration. Multiple 'Config's can be+-- merged through the use of the 'Semigroup' instance.+data Config = Config+  { -- | If requested, a cabal file with this package name will be generated.+    cabalPackageName :: Maybe Text,+    -- | Package version to be used with the cabal package.+    cabalPackageVersion :: Maybe Text,+    -- | Module prefix, e.g. Data.Queries+    haskellModulePrefix :: Maybe Text,+    -- | List of lists of overrides. Nesting is list of allowing cheap+    -- concatenation. No need to create a one big vector.+    overrides :: [Vector Override]+  }++instance Semigroup Config where+  config1 <> config2 =+    Config+      { cabalPackageName =+          getFirst $ First config1.cabalPackageName <> First config2.cabalPackageName,+        cabalPackageVersion =+          getFirst $ First config1.cabalPackageVersion <> First config2.cabalPackageVersion,+        haskellModulePrefix =+          getFirst $ First config1.haskellModulePrefix <> First config2.haskellModulePrefix,+        overrides =+          config1.overrides <> config2.overrides+      }++instance Monoid Config where+  mempty =+    Config+      { overrides = [],+        haskellModulePrefix = Nothing,+        cabalPackageName = Nothing,+        cabalPackageVersion = Nothing+      }++instance FromJSON Config where+  parseJSON = withObject "Config" $ \o ->+    Config+      <$> o .:? "cabal_package_name"+      <*> o .:? "cabal_package_version"+      <*> o .:? "haskell_module_prefix"+      <*> fmap pure (o .:? "overrides" .!= mempty)++data Override = Override+  { haskellType :: HaskellType,+    databaseType :: Text,+    -- Fully qualified name of the column, e.g. `accounts.id`+    column :: Maybe Text,+    -- | For global overrides only when two different engines are in use.+    engine :: Maybe Text,+    -- | True if the haskellType should override if the matching type is nullable+    nullable :: Maybe Bool+  }++instance FromJSON Override where+  parseJSON = withObject "Override" $ \o ->+    Override+      <$> o .: "haskell_type"+      <*> o .: "db_type"+      <*> o .:? "column"+      <*> o .:? "engine"+      <*> o .:? "nullable"++-- | A haskell type denotes a fully qualified data type with module+-- and import and all.+--+-- Haskellers hate this definition as it's very indefinite. Here's some+-- perspective:+--+-- We force people to fully qualify (<=> all fields "Just") when specifying+-- overrides. No indefiniteness here. Check `FromJSON HaskellType`.+--+-- Internally we refer to fully specified types as well, exclusively.+-- No indefiniteness here either.+--+-- But: When resolving types we want to be able to express composed types+-- like "Maybe (Vector Text)". We do not want to specify module and package+-- but really only the name.+data HaskellType = HaskellType+  { package :: Maybe Text,+    module' :: Maybe Text,+    name :: Maybe Text+  }++instance FromJSON HaskellType where+  parseJSON = withObject "HaskellType" $ \o ->+    HaskellType+      <$> fmap Just (o .: "package")+      <*> fmap Just (o .: "module")+      <*> fmap Just (o .: "type")++parseConfig :: ByteString -> Either String Config+parseConfig input =+  case input of+    "" -> Right mempty+    input -> eitherDecodeStrict input++defaultConfig :: Config+defaultConfig =+  mempty+    { cabalPackageName = Just "queries",+      cabalPackageVersion = Just "0.1.0.0",+      haskellModulePrefix = Just "Queries",+      overrides = []+    }
+ src/Sqlc/Hs/Main.hs view
@@ -0,0 +1,78 @@+module Sqlc.Hs.Main (main) where++import Data.ByteString qualified+import Data.ProtoLens qualified+import Data.ProtoLens.Labels ()+import Proto.Protos.Codegen qualified+import Sqlc.Hs.Codegen qualified+import Sqlc.Hs.Config qualified+import System.Directory qualified+import System.Exit qualified+import System.FilePath qualified+import System.IO qualified++main :: IO ()+main = do+  contents <- Data.ByteString.getContents++  args <- getArgs++  let testMode :: Maybe FilePath+      testMode =+        case args of+          "--out" : out : _ -> Just out+          _ -> Nothing++  generateRequest <-+    case Data.ProtoLens.decodeMessage @Proto.Protos.Codegen.GenerateRequest contents of+      Left errorMessage -> do+        System.IO.hPutStrLn System.IO.stderr errorMessage+        System.Exit.exitWith (System.Exit.ExitFailure 1)+      Right generateRequest ->+        pure generateRequest++  -- System.IO.hPutStrLn System.IO.stdout (show $ generateRequest)++  pluginOptions <-+    case Sqlc.Hs.Config.parseConfig (generateRequest ^. #pluginOptions) of+      Left errorMessage -> do+        System.IO.hPutStrLn System.IO.stderr errorMessage+        System.Exit.exitWith (System.Exit.ExitFailure 1)+      Right config ->+        pure config++  globalOptions <-+    case Sqlc.Hs.Config.parseConfig (generateRequest ^. #globalOptions) of+      Left errorMessage -> do+        System.IO.hPutStrLn System.IO.stderr errorMessage+        System.Exit.exitWith (System.Exit.ExitFailure 1)+      Right config ->+        pure config++  let -- Rule: Plugin config > Global config > Default config+      mergedConfig =+        pluginOptions <> globalOptions <> Sqlc.Hs.Config.defaultConfig++  files <-+    Sqlc.Hs.Codegen.codegen mergedConfig generateRequest++  whenJust testMode $ \outDirectory -> do+    for_ files $ \file -> do+      let filepath = outDirectory <> "/" <> toString file.name+      System.Directory.createDirectoryIfMissing True (System.FilePath.takeDirectory filepath)+      Data.ByteString.writeFile filepath file.contents++  whenNothing_ testMode $ do+    let generateResponse :: Proto.Protos.Codegen.GenerateResponse+        generateResponse =+          Data.ProtoLens.defMessage+            & #files+            .~ fromList+              [ Data.ProtoLens.defMessage+                  & (#name .~ file.name)+                  & (#contents .~ file.contents)+                | file <- files+              ]++    Data.ByteString.putStr+      (Data.ProtoLens.encodeMessage generateResponse)
+ src/Sqlc/Hs/Resolve.hs view
@@ -0,0 +1,503 @@+module Sqlc.Hs.Resolve+  ( ResolveType,+    newResolveType,+    -- | How to resolve names to Haskell modules and files+    ResolveName,+    ResolvedNames (..),+    resolveQueryName,+    -- | Misc. modules+    determineTopLevelModule,+    determineInternalModule,+  )+where++import Data.Char qualified+import Data.List qualified+import Data.ProtoLens.Labels ()+import Data.Text qualified+import Data.Vector (Vector)+import Proto.Protos.Codegen qualified+import Sqlc.Hs.Config (Config (..), HaskellType (..), Override (..), defaultConfig)+import System.FilePath ((<.>))++determineTopLevelModule ::+  -- | Haskell module prefix. E.g. "Data.Queries".+  Maybe Text ->+  ResolvedNames+determineTopLevelModule haskellModulePrefix =+  resolveQueryName+    Nothing+    (fromMaybe "Queries" (haskellModulePrefix <|> defaultConfig.haskellModulePrefix))++determineInternalModule ::+  -- | Haskell module prefix. E.g. "Data.Queries".+  Maybe Text ->+  ResolvedNames+determineInternalModule haskellModulePrefix =+  resolveQueryName+    (haskellModulePrefix <|> defaultConfig.haskellModulePrefix <|> Just "Queries")+    "Internal"++data ResolvedNames = ResolvedNames+  { toQueryDeclarationName :: Text,+    toParamsConstructorDeclarationName :: Text,+    toResultConstructorDeclarationName :: Text,+    toHaskellFileName :: Text,+    toHaskellModuleName :: Text,+    toFieldName :: Text+  }++type ResolveName = Text -> ResolvedNames++resolveQueryName ::+  -- | Haskell module prefix. E.g. "Data.Queries".+  Maybe Text ->+  -- | Name to resolve+  Text ->+  ResolvedNames+resolveQueryName haskellModulePrefix name =+  ResolvedNames+    { toQueryDeclarationName =+        -- This generates+        --+        -- query_GetAuthors :: ...+        --+        -- in the query modules.+        --+        -- We could some more sophisticated things to make the query name a valid haskell function+        -- declaration identifier.+        "query_" <> sanitizedName,+      toParamsConstructorDeclarationName =+        "Params_" <> sanitizedName,+      toResultConstructorDeclarationName =+        "Result_" <> sanitizedName,+      toFieldName,+      toHaskellFileName =+        toText $+          toString (haskellModuleToPath (applyHaskellModulePrefix nameToHaskellModuleName)) <.> "hs",+      toHaskellModuleName =+        applyHaskellModulePrefix nameToHaskellModuleName+    }+  where+    nameToHaskellModuleName =+      sanitizedModuleName++    haskellModuleToPath :: Text -> Text+    haskellModuleToPath =+      Data.Text.intercalate "/" . Data.Text.splitOn "."++    applyHaskellModulePrefix :: Text -> Text+    applyHaskellModulePrefix =+      case haskellModulePrefix of+        Just prefix ->+          \suffix ->+            Data.Text.intercalate "." $+              Data.Text.splitOn "." prefix <> Data.Text.splitOn "." suffix+        Nothing ->+          identity++    -- A version of the name suitable for consumption as a Haskell identifier.+    sanitizedName :: Text+    sanitizedName = sanitizeHaskellIdentifier name++    -- A version of the name suitable for use as a Haskell module name.+    sanitizedModuleName :: Text+    sanitizedModuleName =+      Data.Text.intercalate "." $+        map sanitizeModuleComponent (Data.Text.splitOn "." name)+      where+        sanitizeModuleComponent module' =+          sanitizeHaskellIdentifier $+            case Data.Text.uncons module' of+              Just (c, rest) ->+                Data.Char.toUpper c `Data.Text.cons` rest+              Nothing ->+                module'++    sanitizeHaskellIdentifier :: Text -> Text+    sanitizeHaskellIdentifier =+      Data.Text.map+        ( \c ->+            case c of+              c+                | Data.Char.isLetter c ->+                    c+                | Data.Char.isDigit c ->+                    c+                | otherwise ->+                    '_'+        )++    toFieldName :: Text+    toFieldName =+      escapeHaskellKeyword $+        case name of+          name+            | Just (c, _rest) <- Data.Text.uncons name,+              Data.Char.isDigit c ->+                -- Prepend _ if the first letter is a digit+                "_" <> name+            | Just (c, rest) <- Data.Text.uncons name,+              Data.Char.isUpper c ->+                -- Ensure first letter is lower cased+                Data.Char.toLower c `Data.Text.cons` rest+            | otherwise ->+                name++    escapeHaskellKeyword x =+      case x of+        "type" -> "type'"+        "module" -> "module'"+        "case" -> "case'"+        "of" -> "of'"+        x -> x++-- | Resolves a possibly fully qualified type to a suitable Haskell type.+--+-- 'ResolveType' may wrap the underlying type into a 'Vector' or 'Maybe', or others depending on whether+-- the column nullable or an array. In this case it might return multiple HaskellTypes of the form+--+--   [ Maybe (Vector Text), base:Data.Maybe.Maybe, vector:Data.Vector.Vector ]+--+-- The first type is the one you want use for code generation while the rest is only info for dependency+-- and import management.+type ResolveType = Proto.Protos.Codegen.Column -> Maybe (Proto.Protos.Codegen.Column, NonEmpty HaskellType)++newtype Overrides a = Overrides [Vector a]+  deriving stock (Functor, Foldable, Traversable)++newResolveType ::+  Config ->+  -- | Engine, if defined+  Text ->+  ResolveType+newResolveType config engine = \column ->+  case mapMaybe (\matcher -> matcher.matcher column) matchers of+    haskellTypes : _ ->+      Just (column, haskellTypes)+    _ ->+      Nothing+  where+    matchers :: [Matcher]+    matchers =+      [ matcher+        | matcher <-+            concat+              [ map overrideToMatcher (toList (Overrides config.overrides)),+                builtins+              ],+          -- In case the GenerateRequest didn't specify an engine.+          engine == mempty+            -- In case the matcher is engine generic+            || isNothing matcher.engine+            -- In case matcher engine and requested engine match+            || matcher.engine == Just engine+      ]++columnDataType :: Proto.Protos.Codegen.Identifier -> Text+columnDataType identifier+  | (identifier ^. #schema) /= mempty =+      (identifier ^. #schema) <> "." <> (identifier ^. #name)+  | otherwise =+      identifier ^. #name++overrideToMatcher :: Override -> Matcher+overrideToMatcher override =+  Matcher+    { engine = override.engine,+      matcher+    }+  where+    -- TODO extend the matching to support overriding individual columns+    matcher column+      | columnDataType (column ^. #type') == override.databaseType =+          Just (pure override.haskellType)+      | otherwise =+          Nothing++builtins :: [Matcher]+builtins =+  [ Matcher {engine = Just "postgresql", matcher = postgresBuiltin},+    Matcher {engine = Just "mysql", matcher = mysqlBuiltin},+    Matcher {engine = Just "sqlite", matcher = sqliteBuiltin}+  ]++data Matcher = Matcher+  { engine :: Maybe Text,+    matcher :: Proto.Protos.Codegen.Column -> Maybe (NonEmpty HaskellType)+  }++mysqlBuiltin :: Proto.Protos.Codegen.Column -> Maybe (NonEmpty HaskellType)+mysqlBuiltin column =+  applyNullable column $+    asum+      [ typ ["varchar", "text", "char", "tinytext", "mediumtext", "longtext"] "text" "Data.Text.Text",+        do+          guard $+            columnType == "tinyint"++          if column ^. #length == 1+            then+              Just $+                pure+                  HaskellType+                    { package = Just "ghc-prim",+                      module' = Just "GHC.Types",+                      name = Just "GHC.Types.Bool"+                    }+            else+              if column ^. #unsigned+                then+                  Just $+                    pure+                      HaskellType+                        { package = Just "base",+                          module' = Just "Data.Word",+                          name = Just "Data.Word.Word8"+                        }+                else+                  Just $+                    pure+                      HaskellType+                        { package = Just "base",+                          module' = Just "Data.Int",+                          name = Just "Data.Int.Int8"+                        },+        do+          guard $+            columnType == "smallint"+          if column ^. #unsigned+            then+              Just $+                pure+                  HaskellType+                    { package = Just "base",+                      module' = Just "Data.Word",+                      name = Just "Data.Word.Word16"+                    }+            else+              Just $+                pure+                  HaskellType+                    { package = Just "base",+                      module' = Just "Data.Int",+                      name = Just "Data.Int.Int16"+                    },+        do+          guard $+            columnType `elem` ["int", "integer", "mediumint"]+          if column ^. #unsigned+            then+              Just $+                pure+                  HaskellType+                    { package = Just "base",+                      module' = Just "Data.Word",+                      name = Just "Data.Word.Word32"+                    }+            else+              Just $+                pure+                  HaskellType+                    { package = Just "base",+                      module' = Just "Data.Int",+                      name = Just "Data.Int.Int32"+                    },+        do+          guard $+            columnType == "bigint"+          if column ^. #unsigned+            then+              Just $+                pure+                  HaskellType+                    { package = Just "base",+                      module' = Just "Data.Word",+                      name = Just "Data.Word.Word64"+                    }+            else+              Just $+                pure+                  HaskellType+                    { package = Just "base",+                      module' = Just "Data.Int",+                      name = Just "Data.Int.Int64"+                    },+        typ ["blob", "binary", "varbinary", "tinyblob", "mediumblob", "longblob"] "bytestring" "Data.ByteString.Short.ShortByteString",+        typ ["double", "double precision", "real", "float"] "ghc-prim" "GHC.Types.Double",+        typ ["decimal", "dec", "fixed"] "scientific" "Data.Scientific.Scientific",+        typ ["enum"] "text" "Data.Text.Text",+        typ ["boolean", "bool"] "ghc-prim" "GHC.Types.Bool",+        typ ["json"] "aeson" "Data.Aeson.Value",+        typ ["date"] "time" "Data.Time.Day",+        typ ["timestamp", "datetime", "time"] "time" "Data.Time.UTCTime"+      ]+  where+    columnType :: Text+    columnType =+      columnDataType (column ^. #type')++    typ mysqlTypes package qualifiedType+      | columnType `elem` mysqlTypes =+          pure $+            pure+              HaskellType+                { package =+                    Just package,+                  module' =+                    Just+                      (Data.Text.intercalate "." (Data.List.init (Data.Text.splitOn "." qualifiedType))),+                  name =+                    Just qualifiedType+                }+      | otherwise =+          Nothing++applyNullable :: Proto.Protos.Codegen.Column -> Maybe (NonEmpty HaskellType) -> Maybe (NonEmpty HaskellType)+applyNullable column types+  | not (column ^. #notNull) =+      case types of+        Just types ->+          Just $+            HaskellType+              { package = Nothing,+                module' = Nothing,+                name = Just ("(GHC.Base.Maybe " <> fromMaybe "" (head types).name <> ")")+              }+              :| head types+              : HaskellType+                { package = Just "base",+                  module' = Just "GHC.Base",+                  name = Nothing+                }+              : tail types+        Nothing ->+          Nothing+  | otherwise =+      types++sqliteBuiltin :: Proto.Protos.Codegen.Column -> Maybe (NonEmpty HaskellType)+sqliteBuiltin column =+  applyNullable column $+    asum+      [ do+          guard $+            columnType `elem`  ["int", "integer", "tinyint", "smallint", "mediumint", "bigint", "unsignedbigint", "int2", "int8"]+          if column ^. #unsigned+            then+              Just $+                pure+                  HaskellType+                    { package = Just "base",+                      module' = Just "Data.Word",+                      name = Just "Data.Word.Word64"+                    }+            else+              Just $+                pure+                  HaskellType+                    { package = Just "base",+                      module' = Just "Data.Int",+                      name = Just "Data.Int.Int64"+                    },++        sqliteType ["blob"] "bytestring" "Data.ByteString.ByteString",+        sqliteType ["real", "double", "doubleprecision", "float"] "ghc-prim" "GHC.Types.Double",+        sqliteType ["bool", "boolean"] "ghc-prim" "GHC.Types.Bool",+        sqliteType ["date", "datetime", "timestamp"] "time" "Data.Time.UTCTime",++        do+          guard $+            or [+              "character" `Data.Text.isPrefixOf` columnType,+              "varchar" `Data.Text.isPrefixOf` columnType,+              "varyingcharacter" `Data.Text.isPrefixOf` columnType,+              "nchar" `Data.Text.isPrefixOf` columnType,+              "nativecharacter" `Data.Text.isPrefixOf` columnType,+              "nvarchar" `Data.Text.isPrefixOf` columnType,+              columnType `elem` [+                "text",+                "clob"+              ]+            ]+          Just $+                pure+                  HaskellType+                    { package = Just "text",+                      module' = Just "Data.Text",+                      name = Just "Data.Text.Text"+                    },+        do+          guard $+            or [+              "decimal" `Data.Text.isPrefixOf` columnType,+              columnType == "numeric"+            ]+          Just $+                pure+                  HaskellType+                    { package = Just "ghc-prim",+                      module' = Just "GHC.Types",+                      name = Just "GHC.Types.Double"+                    }+      ]+  where+    columnType :: Text+    columnType =+      columnDataType (column ^. #type')++    sqliteType dbType package qualifiedType+      | columnType `elem` dbType =+          pure $+            pure+              HaskellType+                { package =+                    Just package,+                  module' =+                    Just+                      (Data.Text.intercalate "." (Data.List.init (Data.Text.splitOn "." qualifiedType))),+                  name =+                    Just qualifiedType+                }+      | otherwise =+          Nothing++postgresBuiltin :: Proto.Protos.Codegen.Column -> Maybe (NonEmpty HaskellType)+postgresBuiltin column =+  applyNullable column $+    asum+      [ pgType ["serial", "serial4", "pg_catalog.serial4"] "base" "Data.Int.Int32",+        pgType ["bigserial", "serial8", "pg_catalog.serial8"] "base" "Data.Int.Int64",+        pgType ["smallserial", "serial2", "pg_catalog.serial2"] "base" "Data.Int.Int16",+        pgType ["integer", "int", "int4", "pg_catalog.int4"] "base" "Data.Int.Int32",+        pgType ["bigint", "int8", "pg_catalog.int8"] "base" "Data.Int.Int64",+        pgType ["smallint", "int2", "pg_catalog.int2"] "base" "Data.Int.Int16",+        pgType ["float", "double precision", "float8", "pg_catalog.float8"] "ghc-prim" "GHC.Types.Double",+        pgType ["real", "float4", "pg_catalog.float4"] "ghc-prim" "GHC.Types.Float",+        pgType ["numeric", "pg_catalog.numeric", "money"] "scientific" "Data.Scientific.Scientific",+        pgType ["boolean", "bool", "pg_catalog.bool"] "ghc-prim" "GHC.Types.Bool",+        pgType ["json", "pg_catalog.json"] "aeson" "Data.Aeson.Value",+        pgType ["jsonb", "pg_catalog.jsonb"] "aeson" "Data.Aeson.Value",+        pgType ["bytea", "blob", "pg_catalog.bytea"] "bytestring" "Data.ByteString.Short.ShortByteString",+        pgType ["text", "pg_catalog.varchar", "pg_catalog.bpchar", "string", "citext", "name"] "text" "Data.Text.Text"+      ]+  where+    columnType :: Text+    columnType =+      columnDataType (column ^. #type')++    pgType pgTypes package qualifiedType+      | columnType `elem` pgTypes =+          pure $+            pure+              HaskellType+                { package =+                    Just package,+                  module' =+                    Just+                      (Data.Text.intercalate "." (Data.List.init (Data.Text.splitOn "." qualifiedType))),+                  name =+                    Just qualifiedType+                }+      | otherwise =+          Nothing
+ templates/internal.mysql.hs.jinja view
@@ -0,0 +1,135 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeFamilies #-}+module {{ moduleName }} (+    Query(..),+    Params,+    Result,++    -- * :execResult+    ExecResult(..),+    execResult,++    -- * :exec+    exec,++    -- * :execrows+    execRows,++    -- * :execlastid+    execLastId,++    -- * :one+    queryOne,++    -- * :many+    queryMany,+    fold,++    -- * Reexports+    Database.MySQL.Simple.Connection,+    Database.MySQL.Simple.QueryParams.QueryParams,+    Database.MySQL.Simple.QueryResults.QueryResults,+  ) where++import Database.MySQL.Simple (Connection)+import GHC.TypeLits (Symbol)+import qualified Data.Int+import qualified Database.MySQL.Simple+import qualified Database.MySQL.Simple.QueryParams+import qualified Database.MySQL.Simple.QueryResults++newtype Query (name :: Symbol) (command :: Symbol)+  = Query Database.MySQL.Simple.Query++data family Params (name :: Symbol)++data family Result (name :: Symbol)++data ExecResult = ExecResult+  { lastInsertId :: !Data.Int.Int64,+    rowsAffected :: !Data.Int.Int64+  }++exec ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":exec" ->+  Params name ->+  IO ()+exec connection (Query sql) params = do+  _rowsAffected <- Database.MySQL.Simple.execute connection sql params+  pure ()++execRows ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execrows" ->+  Params name ->+  IO Data.Int.Int64+execRows connection (Query sql) =+  Database.MySQL.Simple.execute connection sql++execLastId ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execlastid" ->+  Params name ->+  IO Data.Int.Int64+execLastId connection (Query sql) params = do+  _rowsAffected <- Database.MySQL.Simple.execute connection sql params+  lastInsertId <- Database.MySQL.Simple.insertID connection+  pure (fromIntegral lastInsertId)++execResult ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execresult" ->+  Params name ->+  IO ExecResult+execResult connection (Query sql) params = do+  rowsAffected <- Database.MySQL.Simple.execute connection sql params+  lastInsertId <- Database.MySQL.Simple.insertID connection+  pure ExecResult {+    lastInsertId = fromIntegral lastInsertId,+    rowsAffected = rowsAffected+  }++queryOne ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":one" ->+  Params name ->+  IO (Maybe (Result name))+queryOne connection (Query sql) params = do+  result <- Database.MySQL.Simple.query connection sql params+  case result of+    [] -> pure Nothing+    x : _ -> pure (Just x)++queryMany ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  IO [Result name]+queryMany connection (Query sql) =+  Database.MySQL.Simple.query connection sql++fold ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  a ->+  (a -> Result name -> IO a) ->+  IO a+fold connection (Query sql) =+  Database.MySQL.Simple.fold connection sql+{-# INLINABLE fold #-}
+ templates/internal.postgresql.hs.jinja view
@@ -0,0 +1,113 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE TypeFamilies #-}+module {{ moduleName }} (+    Query(..),+    Params,+    Result,++    -- * :execResult+    ExecResult(..),+    execResult,++    -- * :exec+    exec,++    -- * :execrows+    execRows,++    -- * :one+    queryOne,++    -- * :many+    queryMany,+    fold,++    -- * Reexports+    Database.PostgreSQL.Simple.Connection,+    Database.PostgreSQL.Simple.ToRow,+    Database.PostgreSQL.Simple.FromRow,+  ) where++import Data.Vector (Vector)+import Database.PostgreSQL.Simple (Connection, FromRow, ToRow)+import GHC.TypeLits (Symbol)+import qualified Data.Int+import qualified Database.PostgreSQL.Simple+import qualified Database.PostgreSQL.Simple.Vector++newtype Query (name :: Symbol) (command :: Symbol)+  = Query Database.PostgreSQL.Simple.Query++data family Params (name :: Symbol)++data family Result (name :: Symbol)++data ExecResult = ExecResult+  { rowsAffected :: !Data.Int.Int64+  }++exec ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":exec" ->+  Params name ->+  IO ()+exec connection (Query sql) params = do+  _rowsAffected <- Database.PostgreSQL.Simple.execute connection sql params+  pure ()++execRows ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execrows" ->+  Params name ->+  IO Data.Int.Int64+execRows connection (Query sql) = do+  Database.PostgreSQL.Simple.execute connection sql++execResult ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execresult" ->+  Params name ->+  IO ExecResult+execResult connection (Query sql) params = do+  rowsAffected <- Database.PostgreSQL.Simple.execute connection sql params+  pure ExecResult {+    rowsAffected+  }++queryOne ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":one" ->+  Params name ->+  IO (Maybe (Result name))+queryOne connection (Query sql) params = do+  result <- Database.PostgreSQL.Simple.query connection sql params+  case result of+    [] -> pure Nothing+    x : _ -> pure (Just x)++queryMany ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  IO (Vector (Result name))+queryMany connection (Query sql) =+  Database.PostgreSQL.Simple.Vector.query connection sql++fold ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  a ->+  (a -> Result name -> IO a) ->+  IO a+fold connection (Query sql) =+  Database.PostgreSQL.Simple.fold connection sql+{-# INLINABLE fold #-}
+ templates/internal.sqlite.hs.jinja view
@@ -0,0 +1,148 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE TypeFamilies #-}+module {{ moduleName }} (+    Query(..),+    Params,+    Result,++    -- * :execResult+    ExecResult(..),+    execResult,++    -- * :exec+    exec,++    -- * :execrows+    execRows,++    -- * :execlastid+    execLastId,++    -- * :one+    queryOne,++    -- * :many+    queryMany,+    fold,++    -- * Reexports+    Database.SQLite.Simple.Connection,+    Database.SQLite.Simple.ToRow,+    Database.SQLite.Simple.FromRow,+  ) where++import Database.SQLite.Simple (Connection, FromRow, ToRow)+import GHC.TypeLits (Symbol)+import qualified Data.Int+import qualified Database.SQLite.Simple+import qualified Data.Vector+import qualified Data.Vector.Mutable++newtype Query (name :: Symbol) (command :: Symbol)+  = Query Database.SQLite.Simple.Query++data family Params (name :: Symbol)++data family Result (name :: Symbol)++data ExecResult = ExecResult+  { lastInsertId :: !Data.Int.Int64,+    rowsAffected :: !Data.Int.Int64+  }++exec ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":exec" ->+  Params name ->+  IO ()+exec connection (Query sql) =+  Database.SQLite.Simple.execute connection sql++execRows ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execrows" ->+  Params name ->+  IO Data.Int.Int64+execRows connection (Query sql) params = do+  Database.SQLite.Simple.execute connection sql params+  rowsAffected <- Database.SQLite.Simple.changes connection+  pure (fromIntegral rowsAffected)++execLastId ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execlastid" ->+  Params name ->+  IO Data.Int.Int64+execLastId connection (Query sql) params = do+  Database.SQLite.Simple.execute connection sql params+  lastInsertId <- Database.SQLite.Simple.lastInsertRowId connection+  pure lastInsertId++execResult ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execresult" ->+  Params name ->+  IO ExecResult+execResult connection (Query sql) params = do+  Database.SQLite.Simple.execute connection sql params+  rowsAffected <- Database.SQLite.Simple.changes connection+  lastInsertId <- Database.SQLite.Simple.lastInsertRowId connection+  pure ExecResult {+    lastInsertId,+    rowsAffected = fromIntegral rowsAffected+  }++queryOne ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":one" ->+  Params name ->+  IO (Maybe (Result name))+queryOne connection (Query sql) params = do+  result <- Database.SQLite.Simple.query connection sql params+  case result of+    [] -> pure Nothing+    x : _ -> pure (Just x)++data Grow v = Grow !Int !v++queryMany ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  IO (Data.Vector.Vector (Result name))+queryMany connection query params = do+  vector <- Data.Vector.Mutable.unsafeNew 4+  Grow i vector <- fold connection query params (Grow 0 vector) step+  vector <- Data.Vector.unsafeFreeze vector+  pure $! Data.Vector.unsafeTake i vector+  where+    step (Grow i vector) !result+      | i < Data.Vector.Mutable.length vector = do+          Data.Vector.Mutable.unsafeWrite vector i result+          pure $! Grow (i + 1) vector+      | otherwise = do+          -- Grow vector exponentially by doubling its size+          vector <- Data.Vector.Mutable.unsafeGrow vector i+          Data.Vector.Mutable.unsafeWrite vector i result+          pure $! Grow (i + 1) vector++fold ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  a ->+  (a -> Result name -> IO a) ->+  IO a+fold connection (Query sql) =+  Database.SQLite.Simple.fold connection sql+{-# INLINABLE fold #-}
+ templates/package.cabal.jinja view
@@ -0,0 +1,12 @@+cabal-version: 3.0+name: {{ packageName }}+version: {{ packageVersion }}+library+  build-depends:+  {% for dependency in buildDepends %}+    {{ dependency.value }},+  {% endfor %}+  exposed-modules:+  {% for module in exposedModules %}+    {{ module.value }}+  {% endfor %}
+ templates/query.hs.jinja view
@@ -0,0 +1,100 @@+{- This file was auto-generated from {{sourceFile}} by sqlc-hs. -}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+module {{moduleName}} where++import {{ internalModuleName }} (Query(..), Params, Result)+{% if generatePostgresql %}+import qualified Database.PostgreSQL.Simple.FromRow+import qualified Database.PostgreSQL.Simple.ToField+import qualified Database.PostgreSQL.Simple.ToRow+{% endif %}+{% if generateSqlite %}+import qualified Database.SQLite.Simple.FromRow+import qualified Database.SQLite.Simple.ToField+import qualified Database.SQLite.Simple.ToRow+{% endif %}+{% if generateMysql %}+import qualified Database.MySQL.Simple.Param+import qualified Database.MySQL.Simple.QueryParams+import qualified Database.MySQL.Simple.QueryResults+import qualified Database.MySQL.Simple.Result+{% endif %}++{% for import in moduleImports  %}+import qualified {{ import.value }}+{% endfor %}++{{ haskellQueryName }} :: Query {{ escapedQueryName }} {{ escapedCommand }}+{{ haskellQueryName }} = Query {{ escapedSql }}++data instance Params {{ escapedQueryName }} = {{ haskellParamsName }}+  {+  {% for param in parameterColumns %}+    {{ param.value.name }} :: {{ param.value.type }}{% if !param.last %},{% endif %}+  {% endfor %}+  }++data instance Result {{ escapedQueryName }} = {{ haskellResultName }}+  {+  {% for column in resultColumns  %}+    {{ column.value.name }} :: !{{ column.value.type }}{% if !column.last %},{% endif %}+  {% endfor %}+  }++{% if generatePostgresql %}+instance Database.PostgreSQL.Simple.ToRow.ToRow (Params {{ escapedQueryName }}) where+  toRow {{ haskellParamsName }}{% if parameterColumns | empty %}{}{% else %}{..}{% endif%} =+    [ {% for param in parameterColumns %}+      Database.PostgreSQL.Simple.ToField.toField {{ param.value.name }}{% if !param.last %}, {% endif %}+      {% endfor %}+    ]++instance Database.PostgreSQL.Simple.FromRow.FromRow (Result {{ escapedQueryName }}) where+  fromRow =+    {{ haskellResultName }}+    {% for column in resultColumns %}+      {% if column.first %}<$>{% else %}<*>{% endif%} Database.PostgreSQL.Simple.FromRow.field+    {% endfor %}+{% endif %}++{% if generateSqlite %}+instance Database.SQLite.Simple.ToRow.ToRow (Params {{ escapedQueryName }}) where+  toRow {{ haskellParamsName }}{% if parameterColumns | empty %}{}{% else %}{..}{% endif%} =+    [ {% for param in parameterColumns %}+      Database.SQLite.Simple.ToField.toField {{ param.value.name }}{% if !param.last %}, {% endif %}+      {% endfor %}+    ]++instance Database.SQLite.Simple.FromRow.FromRow (Result {{ escapedQueryName }}) where+  fromRow =+    {{ haskellResultName }}+    {% for column in resultColumns %}+      {% if column.first %}<$>{% else %}<*>{% endif%} Database.SQLite.Simple.FromRow.field+    {% endfor %}+{% endif %}++{% if generateMysql %}+instance Database.MySQL.Simple.QueryParams.QueryParams (Params {{ escapedQueryName }}) where+  renderParams {{ haskellParamsName }}{% if parameterColumns | empty %}{}{% else %}{..}{% endif%} =+    [ {% for param in parameterColumns %}+      Database.MySQL.Simple.Param.render {{ param.value.name }}{% if !param.last %}, {% endif %}+      {% endfor %}+    ]++instance Database.MySQL.Simple.QueryResults.QueryResults (Result {{ escapedQueryName }}) where+  convertResults [{% for column in resultColumns %}a_{{ column.index }}{% if !column.last %}, {% endif %}{% endfor%}] [{% for column in resultColumns %}b_{{ column.index }}{% if !column.last %}, {% endif %}{% endfor%}] = {{ haskellResultName }}{% if resultColumns | empty %}{}{% else %}{..}{% endif%}+    {% if resultColumns %}+    where+      {% for column in resultColumns %}+      !{{ column.value.name }} = Database.MySQL.Simple.Result.convert a_{{ column.index }} b_{{ column.index }}+      {% endfor %}+    {% endif %}+  convertResults a b =+    Database.MySQL.Simple.QueryResults.convertError a b {{ resultColumns | length }}+{% endif %}
+ templates/toplevel.hs.jinja view
@@ -0,0 +1,10 @@+module {{ moduleName }}+  ( module {{ internalModuleName }},+    module Queries+  )+where++import qualified {{ internalModuleName }}+{% for module in modules %}+import qualified {{ module.value }} as Queries+{% endfor %}
+ test/Driver.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF tasty-discover #-}
+ test/Test/Sqlc/Hs/Golden.hs view
@@ -0,0 +1,101 @@+module Test.Sqlc.Hs.Golden where++import Data.ByteString qualified+import Data.ProtoLens qualified+import Data.ProtoLens.Labels ()+import Proto.Protos.Codegen qualified+import System.Directory qualified+import System.Exit (ExitCode (..))+import System.FilePath (dropExtension, (</>))+import System.IO qualified+import System.IO.Error qualified+import System.IO.Temp qualified+import System.Process qualified+import System.Process.ByteString qualified+import Test.Tasty (TestTree, withResource)+import Test.Tasty.Golden (createDirectoriesAndWriteFile, findByExtension)+import Test.Tasty.Golden.Advanced (goldenTest)++test_golden :: IO [TestTree]+test_golden = do+  inputs <- findByExtension [".input"] "test/golden"+  pure $+    inputs <&> \input ->+      withResource+        ( do+            tmpdir <- System.IO.Temp.getCanonicalTemporaryDirectory+            System.IO.Temp.createTempDirectory tmpdir "sqlc-hs-test"+        )+        ( \tmpdir ->+            System.IO.Error.catchIOError+              (System.Directory.removeDirectoryRecursive tmpdir)+              (\_ -> pure ())+        )+        $ \createTestDirectory ->+          let goldenDirectory :: FilePath+              goldenDirectory =+                dropExtension input+           in goldenTest+                input+                ( do+                    -- Listing a non-existing directory throws an exception such+                    -- that tasty-golden registers the test as new and just accepts+                    -- the output.+                    _ <- System.Directory.listDirectory goldenDirectory+                    pure goldenDirectory+                )+                ( do+                    message <-+                      Data.ByteString.readFile input++                    message <-+                      case Data.ProtoLens.readMessage @Proto.Protos.Codegen.GenerateRequest (toLazy (decodeUtf8 message)) of+                        Left errorMessage ->+                          error (toText errorMessage)+                        Right message ->+                          pure message++                    (exitCode, stdout, stderr) <-+                      System.Process.ByteString.readProcessWithExitCode+                        "sqlc-hs"+                        []+                        (Data.ProtoLens.encodeMessage message)++                    Data.ByteString.hPut System.IO.stderr stderr++                    unless (exitCode == ExitSuccess) $+                      error "sqlc-hs failed with an non-zero exit-code"++                    message <-+                      case Data.ProtoLens.decodeMessage @Proto.Protos.Codegen.GenerateResponse stdout of+                        Left errorMessage ->+                          error (toText errorMessage)+                        Right message ->+                          pure message++                    testDirectory <- createTestDirectory++                    -- To ease debugging we write out the files as proper files too.+                    for_ (message ^. #files) $ \file -> do+                      let outputFile = testDirectory </> toString (file ^. #name)+                      createDirectoriesAndWriteFile outputFile (toLazy (file ^. #contents))++                    pure testDirectory+                )+                ( \a b -> do+                    (_exitCode, stdout, _stderr) <-+                      System.Process.readProcessWithExitCode "diff" ["--recursive", a, b] ""+                    case stdout of+                      "" ->+                        pure Nothing+                      stdout ->+                        pure (Just stdout)+                )+                ( \testDirectory -> do+                    -- Delete the goldenDirectory first to avoid any leftover dangling files.+                    System.IO.Error.catchIOError+                      (System.Directory.removeDirectoryRecursive goldenDirectory)+                      (\_ -> pure ())++                    System.Directory.renameDirectory testDirectory goldenDirectory+                )
+ test/golden/empty.input view
+ test/golden/empty/Queries.hs view
@@ -0,0 +1,7 @@+module Queries+  ( module Queries.Internal,+    module Queries+  )+where++import qualified Queries.Internal
+ test/golden/empty/Queries/Internal.hs view
@@ -0,0 +1,113 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE TypeFamilies #-}+module Queries.Internal (+    Query(..),+    Params,+    Result,++    -- * :execResult+    ExecResult(..),+    execResult,++    -- * :exec+    exec,++    -- * :execrows+    execRows,++    -- * :one+    queryOne,++    -- * :many+    queryMany,+    fold,++    -- * Reexports+    Database.PostgreSQL.Simple.Connection,+    Database.PostgreSQL.Simple.ToRow,+    Database.PostgreSQL.Simple.FromRow,+  ) where++import Data.Vector (Vector)+import Database.PostgreSQL.Simple (Connection, FromRow, ToRow)+import GHC.TypeLits (Symbol)+import qualified Data.Int+import qualified Database.PostgreSQL.Simple+import qualified Database.PostgreSQL.Simple.Vector++newtype Query (name :: Symbol) (command :: Symbol)+  = Query Database.PostgreSQL.Simple.Query++data family Params (name :: Symbol)++data family Result (name :: Symbol)++data ExecResult = ExecResult+  { rowsAffected :: !Data.Int.Int64+  }++exec ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":exec" ->+  Params name ->+  IO ()+exec connection (Query sql) params = do+  _rowsAffected <- Database.PostgreSQL.Simple.execute connection sql params+  pure ()++execRows ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execrows" ->+  Params name ->+  IO Data.Int.Int64+execRows connection (Query sql) = do+  Database.PostgreSQL.Simple.execute connection sql++execResult ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execresult" ->+  Params name ->+  IO ExecResult+execResult connection (Query sql) params = do+  rowsAffected <- Database.PostgreSQL.Simple.execute connection sql params+  pure ExecResult {+    rowsAffected+  }++queryOne ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":one" ->+  Params name ->+  IO (Maybe (Result name))+queryOne connection (Query sql) params = do+  result <- Database.PostgreSQL.Simple.query connection sql params+  case result of+    [] -> pure Nothing+    x : _ -> pure (Just x)++queryMany ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  IO (Vector (Result name))+queryMany connection (Query sql) =+  Database.PostgreSQL.Simple.Vector.query connection sql++fold ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  a ->+  (a -> Result name -> IO a) ->+  IO a+fold connection (Query sql) =+  Database.PostgreSQL.Simple.fold connection sql+{-# INLINABLE fold #-}
+ test/golden/empty/queries.cabal view
@@ -0,0 +1,11 @@+cabal-version: 3.0+name: queries+version: 0.1.0.0+library+  build-depends:+    base,+    postgresql-simple,+    vector,+  exposed-modules:+    Queries+    Queries.Internal
+ test/golden/nested-module.input view
@@ -0,0 +1,5 @@+settings {+  engine: "mysql"+}++global_options: "{ \"cabal_package_name\": \"nested-module\", \"haskell_module_prefix\": \"Foo.Bar\" }"
+ test/golden/nested-module/Foo/Bar.hs view
@@ -0,0 +1,7 @@+module Foo.Bar+  ( module Foo.Bar.Internal,+    module Queries+  )+where++import qualified Foo.Bar.Internal
+ test/golden/nested-module/Foo/Bar/Internal.hs view
@@ -0,0 +1,135 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeFamilies #-}+module Foo.Bar.Internal (+    Query(..),+    Params,+    Result,++    -- * :execResult+    ExecResult(..),+    execResult,++    -- * :exec+    exec,++    -- * :execrows+    execRows,++    -- * :execlastid+    execLastId,++    -- * :one+    queryOne,++    -- * :many+    queryMany,+    fold,++    -- * Reexports+    Database.MySQL.Simple.Connection,+    Database.MySQL.Simple.QueryParams.QueryParams,+    Database.MySQL.Simple.QueryResults.QueryResults,+  ) where++import Database.MySQL.Simple (Connection)+import GHC.TypeLits (Symbol)+import qualified Data.Int+import qualified Database.MySQL.Simple+import qualified Database.MySQL.Simple.QueryParams+import qualified Database.MySQL.Simple.QueryResults++newtype Query (name :: Symbol) (command :: Symbol)+  = Query Database.MySQL.Simple.Query++data family Params (name :: Symbol)++data family Result (name :: Symbol)++data ExecResult = ExecResult+  { lastInsertId :: !Data.Int.Int64,+    rowsAffected :: !Data.Int.Int64+  }++exec ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":exec" ->+  Params name ->+  IO ()+exec connection (Query sql) params = do+  _rowsAffected <- Database.MySQL.Simple.execute connection sql params+  pure ()++execRows ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execrows" ->+  Params name ->+  IO Data.Int.Int64+execRows connection (Query sql) =+  Database.MySQL.Simple.execute connection sql++execLastId ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execlastid" ->+  Params name ->+  IO Data.Int.Int64+execLastId connection (Query sql) params = do+  _rowsAffected <- Database.MySQL.Simple.execute connection sql params+  lastInsertId <- Database.MySQL.Simple.insertID connection+  pure (fromIntegral lastInsertId)++execResult ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execresult" ->+  Params name ->+  IO ExecResult+execResult connection (Query sql) params = do+  rowsAffected <- Database.MySQL.Simple.execute connection sql params+  lastInsertId <- Database.MySQL.Simple.insertID connection+  pure ExecResult {+    lastInsertId = fromIntegral lastInsertId,+    rowsAffected = rowsAffected+  }++queryOne ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":one" ->+  Params name ->+  IO (Maybe (Result name))+queryOne connection (Query sql) params = do+  result <- Database.MySQL.Simple.query connection sql params+  case result of+    [] -> pure Nothing+    x : _ -> pure (Just x)++queryMany ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  IO [Result name]+queryMany connection (Query sql) =+  Database.MySQL.Simple.query connection sql++fold ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  a ->+  (a -> Result name -> IO a) ->+  IO a+fold connection (Query sql) =+  Database.MySQL.Simple.fold connection sql+{-# INLINABLE fold #-}
+ test/golden/nested-module/nested-module.cabal view
@@ -0,0 +1,10 @@+cabal-version: 3.0+name: nested-module+version: 0.1.0.0+library+  build-depends:+    base,+    mysql-simple,+  exposed-modules:+    Foo.Bar+    Foo.Bar.Internal
+ test/golden/simple-query-mysql.input view
@@ -0,0 +1,35 @@+settings {+  engine: "mysql"+}++queries {+  text: "SELECT * FROM users WHERE $1 > 42;"+  name: "ListUsers"+  cmd: "SELECT"+  filename: "query/users.sql"+  columns {+    name: "id"+    not_null: true+    type {+      name: "int"+    }+  }+  columns {+    name: "name"+    not_null: true+    type {+      name: "text"+    }+  }+  params {+    column {+      name: "age"+      not_null: true+      type {+        name: "int"+      }+    }+  }+}++global_options: "{ \"cabal_package_name\": \"simple-query-mysql\" }"
+ test/golden/simple-query-mysql/Queries.hs view
@@ -0,0 +1,8 @@+module Queries+  ( module Queries.Internal,+    module Queries+  )+where++import qualified Queries.Internal+import qualified Queries.ListUsers as Queries
+ test/golden/simple-query-mysql/Queries/Internal.hs view
@@ -0,0 +1,135 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeFamilies #-}+module Queries.Internal (+    Query(..),+    Params,+    Result,++    -- * :execResult+    ExecResult(..),+    execResult,++    -- * :exec+    exec,++    -- * :execrows+    execRows,++    -- * :execlastid+    execLastId,++    -- * :one+    queryOne,++    -- * :many+    queryMany,+    fold,++    -- * Reexports+    Database.MySQL.Simple.Connection,+    Database.MySQL.Simple.QueryParams.QueryParams,+    Database.MySQL.Simple.QueryResults.QueryResults,+  ) where++import Database.MySQL.Simple (Connection)+import GHC.TypeLits (Symbol)+import qualified Data.Int+import qualified Database.MySQL.Simple+import qualified Database.MySQL.Simple.QueryParams+import qualified Database.MySQL.Simple.QueryResults++newtype Query (name :: Symbol) (command :: Symbol)+  = Query Database.MySQL.Simple.Query++data family Params (name :: Symbol)++data family Result (name :: Symbol)++data ExecResult = ExecResult+  { lastInsertId :: !Data.Int.Int64,+    rowsAffected :: !Data.Int.Int64+  }++exec ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":exec" ->+  Params name ->+  IO ()+exec connection (Query sql) params = do+  _rowsAffected <- Database.MySQL.Simple.execute connection sql params+  pure ()++execRows ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execrows" ->+  Params name ->+  IO Data.Int.Int64+execRows connection (Query sql) =+  Database.MySQL.Simple.execute connection sql++execLastId ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execlastid" ->+  Params name ->+  IO Data.Int.Int64+execLastId connection (Query sql) params = do+  _rowsAffected <- Database.MySQL.Simple.execute connection sql params+  lastInsertId <- Database.MySQL.Simple.insertID connection+  pure (fromIntegral lastInsertId)++execResult ::+  Database.MySQL.Simple.QueryParams.QueryParams (Params name) =>+  Connection ->+  Query name ":execresult" ->+  Params name ->+  IO ExecResult+execResult connection (Query sql) params = do+  rowsAffected <- Database.MySQL.Simple.execute connection sql params+  lastInsertId <- Database.MySQL.Simple.insertID connection+  pure ExecResult {+    lastInsertId = fromIntegral lastInsertId,+    rowsAffected = rowsAffected+  }++queryOne ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":one" ->+  Params name ->+  IO (Maybe (Result name))+queryOne connection (Query sql) params = do+  result <- Database.MySQL.Simple.query connection sql params+  case result of+    [] -> pure Nothing+    x : _ -> pure (Just x)++queryMany ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  IO [Result name]+queryMany connection (Query sql) =+  Database.MySQL.Simple.query connection sql++fold ::+  ( Database.MySQL.Simple.QueryParams.QueryParams (Params name),+    Database.MySQL.Simple.QueryResults.QueryResults (Result name)+  ) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  a ->+  (a -> Result name -> IO a) ->+  IO a+fold connection (Query sql) =+  Database.MySQL.Simple.fold connection sql+{-# INLINABLE fold #-}
+ test/golden/simple-query-mysql/Queries/ListUsers.hs view
@@ -0,0 +1,48 @@+{- This file was auto-generated from query/users.sql by sqlc-hs. -}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+module Queries.ListUsers where++import Queries.Internal (Query(..), Params, Result)+import qualified Database.MySQL.Simple.Param+import qualified Database.MySQL.Simple.QueryParams+import qualified Database.MySQL.Simple.QueryResults+import qualified Database.MySQL.Simple.Result++import qualified Data.Int+import qualified Data.Text++query_ListUsers :: Query "ListUsers" "SELECT"+query_ListUsers = Query "SELECT * FROM users WHERE $1 > 42;"++data instance Params "ListUsers" = Params_ListUsers+  {+    age :: Data.Int.Int32+  }++data instance Result "ListUsers" = Result_ListUsers+  {+    id :: !Data.Int.Int32,+    name :: !Data.Text.Text+  }++++instance Database.MySQL.Simple.QueryParams.QueryParams (Params "ListUsers") where+  renderParams Params_ListUsers{..} =+    [ +      Database.MySQL.Simple.Param.render age+    ]++instance Database.MySQL.Simple.QueryResults.QueryResults (Result "ListUsers") where+  convertResults [a_1, a_2] [b_1, b_2] = Result_ListUsers{..}+    where+      !id = Database.MySQL.Simple.Result.convert a_1 b_1+      !name = Database.MySQL.Simple.Result.convert a_2 b_2+  convertResults a b =+    Database.MySQL.Simple.QueryResults.convertError a b 2
+ test/golden/simple-query-mysql/simple-query-mysql.cabal view
@@ -0,0 +1,12 @@+cabal-version: 3.0+name: simple-query-mysql+version: 0.1.0.0+library+  build-depends:+    base,+    mysql-simple,+    text,+  exposed-modules:+    Queries+    Queries.Internal+    Queries.ListUsers
+ test/golden/simple-query-postgresql.input view
@@ -0,0 +1,35 @@+settings {+  engine: "postgresql"+}++queries {+  text: "SELECT * FROM users WHERE $1 > 42;"+  name: "ListUsers"+  cmd: "SELECT"+  filename: "query/users.sql"+  columns {+    name: "id"+    not_null: true+    type {+      name: "int"+    }+  }+  columns {+    name: "name"+    not_null: true+    type {+      name: "text"+    }+  }+  params {+    column {+      name: "age"+      not_null: true+      type {+        name: "int"+      }+    }+  }+}++global_options: "{ \"cabal_package_name\": \"simple-query-postgresql\" }"
+ test/golden/simple-query-postgresql/Queries.hs view
@@ -0,0 +1,8 @@+module Queries+  ( module Queries.Internal,+    module Queries+  )+where++import qualified Queries.Internal+import qualified Queries.ListUsers as Queries
+ test/golden/simple-query-postgresql/Queries/Internal.hs view
@@ -0,0 +1,113 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE TypeFamilies #-}+module Queries.Internal (+    Query(..),+    Params,+    Result,++    -- * :execResult+    ExecResult(..),+    execResult,++    -- * :exec+    exec,++    -- * :execrows+    execRows,++    -- * :one+    queryOne,++    -- * :many+    queryMany,+    fold,++    -- * Reexports+    Database.PostgreSQL.Simple.Connection,+    Database.PostgreSQL.Simple.ToRow,+    Database.PostgreSQL.Simple.FromRow,+  ) where++import Data.Vector (Vector)+import Database.PostgreSQL.Simple (Connection, FromRow, ToRow)+import GHC.TypeLits (Symbol)+import qualified Data.Int+import qualified Database.PostgreSQL.Simple+import qualified Database.PostgreSQL.Simple.Vector++newtype Query (name :: Symbol) (command :: Symbol)+  = Query Database.PostgreSQL.Simple.Query++data family Params (name :: Symbol)++data family Result (name :: Symbol)++data ExecResult = ExecResult+  { rowsAffected :: !Data.Int.Int64+  }++exec ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":exec" ->+  Params name ->+  IO ()+exec connection (Query sql) params = do+  _rowsAffected <- Database.PostgreSQL.Simple.execute connection sql params+  pure ()++execRows ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execrows" ->+  Params name ->+  IO Data.Int.Int64+execRows connection (Query sql) = do+  Database.PostgreSQL.Simple.execute connection sql++execResult ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execresult" ->+  Params name ->+  IO ExecResult+execResult connection (Query sql) params = do+  rowsAffected <- Database.PostgreSQL.Simple.execute connection sql params+  pure ExecResult {+    rowsAffected+  }++queryOne ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":one" ->+  Params name ->+  IO (Maybe (Result name))+queryOne connection (Query sql) params = do+  result <- Database.PostgreSQL.Simple.query connection sql params+  case result of+    [] -> pure Nothing+    x : _ -> pure (Just x)++queryMany ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  IO (Vector (Result name))+queryMany connection (Query sql) =+  Database.PostgreSQL.Simple.Vector.query connection sql++fold ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  a ->+  (a -> Result name -> IO a) ->+  IO a+fold connection (Query sql) =+  Database.PostgreSQL.Simple.fold connection sql+{-# INLINABLE fold #-}
+ test/golden/simple-query-postgresql/Queries/ListUsers.hs view
@@ -0,0 +1,45 @@+{- This file was auto-generated from query/users.sql by sqlc-hs. -}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+module Queries.ListUsers where++import Queries.Internal (Query(..), Params, Result)+import qualified Database.PostgreSQL.Simple.FromRow+import qualified Database.PostgreSQL.Simple.ToField+import qualified Database.PostgreSQL.Simple.ToRow++import qualified Data.Int+import qualified Data.Text++query_ListUsers :: Query "ListUsers" "SELECT"+query_ListUsers = Query "SELECT * FROM users WHERE $1 > 42;"++data instance Params "ListUsers" = Params_ListUsers+  {+    age :: Data.Int.Int32+  }++data instance Result "ListUsers" = Result_ListUsers+  {+    id :: !Data.Int.Int32,+    name :: !Data.Text.Text+  }++instance Database.PostgreSQL.Simple.ToRow.ToRow (Params "ListUsers") where+  toRow Params_ListUsers{..} =+    [ +      Database.PostgreSQL.Simple.ToField.toField age+    ]++instance Database.PostgreSQL.Simple.FromRow.FromRow (Result "ListUsers") where+  fromRow =+    Result_ListUsers+      <$> Database.PostgreSQL.Simple.FromRow.field+      <*> Database.PostgreSQL.Simple.FromRow.field++
+ test/golden/simple-query-postgresql/simple-query-postgresql.cabal view
@@ -0,0 +1,13 @@+cabal-version: 3.0+name: simple-query-postgresql+version: 0.1.0.0+library+  build-depends:+    base,+    postgresql-simple,+    text,+    vector,+  exposed-modules:+    Queries+    Queries.Internal+    Queries.ListUsers
+ test/golden/simple-query-sqlite.input view
@@ -0,0 +1,35 @@+settings {+  engine: "sqlite"+}++queries {+  text: "SELECT * FROM users WHERE $1 > 42;"+  name: "ListUsers"+  cmd: "SELECT"+  filename: "query/users.sql"+  columns {+    name: "id"+    not_null: true+    type {+      name: "int"+    }+  }+  columns {+    name: "name"+    not_null: true+    type {+      name: "text"+    }+  }+  params {+    column {+      name: "age"+      not_null: true+      type {+        name: "int"+      }+    }+  }+}++global_options: "{ \"cabal_package_name\": \"simple-query-sqlite\" }"
+ test/golden/simple-query-sqlite/Queries.hs view
@@ -0,0 +1,8 @@+module Queries+  ( module Queries.Internal,+    module Queries+  )+where++import qualified Queries.Internal+import qualified Queries.ListUsers as Queries
+ test/golden/simple-query-sqlite/Queries/Internal.hs view
@@ -0,0 +1,148 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE TypeFamilies #-}+module Queries.Internal (+    Query(..),+    Params,+    Result,++    -- * :execResult+    ExecResult(..),+    execResult,++    -- * :exec+    exec,++    -- * :execrows+    execRows,++    -- * :execlastid+    execLastId,++    -- * :one+    queryOne,++    -- * :many+    queryMany,+    fold,++    -- * Reexports+    Database.SQLite.Simple.Connection,+    Database.SQLite.Simple.ToRow,+    Database.SQLite.Simple.FromRow,+  ) where++import Database.SQLite.Simple (Connection, FromRow, ToRow)+import GHC.TypeLits (Symbol)+import qualified Data.Int+import qualified Database.SQLite.Simple+import qualified Data.Vector+import qualified Data.Vector.Mutable++newtype Query (name :: Symbol) (command :: Symbol)+  = Query Database.SQLite.Simple.Query++data family Params (name :: Symbol)++data family Result (name :: Symbol)++data ExecResult = ExecResult+  { lastInsertId :: !Data.Int.Int64,+    rowsAffected :: !Data.Int.Int64+  }++exec ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":exec" ->+  Params name ->+  IO ()+exec connection (Query sql) =+  Database.SQLite.Simple.execute connection sql++execRows ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execrows" ->+  Params name ->+  IO Data.Int.Int64+execRows connection (Query sql) params = do+  Database.SQLite.Simple.execute connection sql params+  rowsAffected <- Database.SQLite.Simple.changes connection+  pure (fromIntegral rowsAffected)++execLastId ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execlastid" ->+  Params name ->+  IO Data.Int.Int64+execLastId connection (Query sql) params = do+  Database.SQLite.Simple.execute connection sql params+  lastInsertId <- Database.SQLite.Simple.lastInsertRowId connection+  pure lastInsertId++execResult ::+  (ToRow (Params name)) =>+  Connection ->+  Query name ":execresult" ->+  Params name ->+  IO ExecResult+execResult connection (Query sql) params = do+  Database.SQLite.Simple.execute connection sql params+  rowsAffected <- Database.SQLite.Simple.changes connection+  lastInsertId <- Database.SQLite.Simple.lastInsertRowId connection+  pure ExecResult {+    lastInsertId,+    rowsAffected = fromIntegral rowsAffected+  }++queryOne ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":one" ->+  Params name ->+  IO (Maybe (Result name))+queryOne connection (Query sql) params = do+  result <- Database.SQLite.Simple.query connection sql params+  case result of+    [] -> pure Nothing+    x : _ -> pure (Just x)++data Grow v = Grow !Int !v++queryMany ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  IO (Data.Vector.Vector (Result name))+queryMany connection query params = do+  vector <- Data.Vector.Mutable.unsafeNew 4+  Grow i vector <- fold connection query params (Grow 0 vector) step+  vector <- Data.Vector.unsafeFreeze vector+  pure $! Data.Vector.unsafeTake i vector+  where+    step (Grow i vector) !result+      | i < Data.Vector.Mutable.length vector = do+          Data.Vector.Mutable.unsafeWrite vector i result+          pure $! Grow (i + 1) vector+      | otherwise = do+          -- Grow vector exponentially by doubling its size+          vector <- Data.Vector.Mutable.unsafeGrow vector i+          Data.Vector.Mutable.unsafeWrite vector i result+          pure $! Grow (i + 1) vector++fold ::+  (ToRow (Params name), FromRow (Result name)) =>+  Connection ->+  Query name ":many" ->+  Params name ->+  a ->+  (a -> Result name -> IO a) ->+  IO a+fold connection (Query sql) =+  Database.SQLite.Simple.fold connection sql+{-# INLINABLE fold #-}
+ test/golden/simple-query-sqlite/Queries/ListUsers.hs view
@@ -0,0 +1,45 @@+{- This file was auto-generated from query/users.sql by sqlc-hs. -}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+module Queries.ListUsers where++import Queries.Internal (Query(..), Params, Result)+import qualified Database.SQLite.Simple.FromRow+import qualified Database.SQLite.Simple.ToField+import qualified Database.SQLite.Simple.ToRow++import qualified Data.Int+import qualified Data.Text++query_ListUsers :: Query "ListUsers" "SELECT"+query_ListUsers = Query "SELECT * FROM users WHERE $1 > 42;"++data instance Params "ListUsers" = Params_ListUsers+  {+    age :: Data.Int.Int64+  }++data instance Result "ListUsers" = Result_ListUsers+  {+    id :: !Data.Int.Int64,+    name :: !Data.Text.Text+  }+++instance Database.SQLite.Simple.ToRow.ToRow (Params "ListUsers") where+  toRow Params_ListUsers{..} =+    [ +      Database.SQLite.Simple.ToField.toField age+    ]++instance Database.SQLite.Simple.FromRow.FromRow (Result "ListUsers") where+  fromRow =+    Result_ListUsers+      <$> Database.SQLite.Simple.FromRow.field+      <*> Database.SQLite.Simple.FromRow.field+
+ test/golden/simple-query-sqlite/simple-query-sqlite.cabal view
@@ -0,0 +1,13 @@+cabal-version: 3.0+name: simple-query-sqlite+version: 0.1.0.0+library+  build-depends:+    base,+    sqlite-simple,+    text,+    vector,+  exposed-modules:+    Queries+    Queries.Internal+    Queries.ListUsers