(declare (block) (standard-bindings) (extended-bindings))
(begin
  (define std/db/postgresql#postgresql-connection::t
    (make-struct-type
     'std/db/postgresql#postgresql-connection::t
     std/db/dbi#connection::t
     '0
     'postgresql-connection
     '((final: . #t))
     '#f
     '()))
  (define std/db/postgresql#postgresql-connection?
    (make-struct-predicate std/db/postgresql#postgresql-connection::t))
  (define std/db/postgresql#make-postgresql-connection
    (lambda _$args3033_
      (apply make-struct-instance
             std/db/postgresql#postgresql-connection::t
             _$args3033_)))
  (define std/db/postgresql#postgresql-statement::t
    (make-struct-type
     'std/db/postgresql#postgresql-statement::t
     std/db/dbi#statement::t
     '7
     'postgresql-statement
     '((final: . #t))
     ':init!
     '(conn params cols bind row inp token)))
  (define std/db/postgresql#postgresql-statement?
    (make-struct-predicate std/db/postgresql#postgresql-statement::t))
  (define std/db/postgresql#make-postgresql-statement
    (lambda _$args3030_
      (apply make-struct-instance
             std/db/postgresql#postgresql-statement::t
             _$args3030_)))
  (define std/db/postgresql#postgresql-statement-conn
    (make-struct-field-accessor std/db/postgresql#postgresql-statement::t '0))
  (define std/db/postgresql#postgresql-statement-params
    (make-struct-field-accessor std/db/postgresql#postgresql-statement::t '1))
  (define std/db/postgresql#postgresql-statement-cols
    (make-struct-field-accessor std/db/postgresql#postgresql-statement::t '2))
  (define std/db/postgresql#postgresql-statement-bind
    (make-struct-field-accessor std/db/postgresql#postgresql-statement::t '3))
  (define std/db/postgresql#postgresql-statement-row
    (make-struct-field-accessor std/db/postgresql#postgresql-statement::t '4))
  (define std/db/postgresql#postgresql-statement-inp
    (make-struct-field-accessor std/db/postgresql#postgresql-statement::t '5))
  (define std/db/postgresql#postgresql-statement-token
    (make-struct-field-accessor std/db/postgresql#postgresql-statement::t '6))
  (define std/db/postgresql#postgresql-statement-conn-set!
    (make-struct-field-mutator std/db/postgresql#postgresql-statement::t '0))
  (define std/db/postgresql#postgresql-statement-params-set!
    (make-struct-field-mutator std/db/postgresql#postgresql-statement::t '1))
  (define std/db/postgresql#postgresql-statement-cols-set!
    (make-struct-field-mutator std/db/postgresql#postgresql-statement::t '2))
  (define std/db/postgresql#postgresql-statement-bind-set!
    (make-struct-field-mutator std/db/postgresql#postgresql-statement::t '3))
  (define std/db/postgresql#postgresql-statement-row-set!
    (make-struct-field-mutator std/db/postgresql#postgresql-statement::t '4))
  (define std/db/postgresql#postgresql-statement-inp-set!
    (make-struct-field-mutator std/db/postgresql#postgresql-statement::t '5))
  (define std/db/postgresql#postgresql-statement-token-set!
    (make-struct-field-mutator std/db/postgresql#postgresql-statement::t '6))
  (define std/db/postgresql#postgresql-statement:::init!
    (lambda (_self3024_ _name3025_ _conn3026_ _params3027_ _cols3028_)
      (if (let ((__tmp8182
                 (let () (declare (not safe)) (##vector-length _self3024_))))
            (declare (not safe))
            (##fx< '4 __tmp8182))
          (begin
            (let ()
              (declare (not safe))
              (##vector-set! _self3024_ '1 _name3025_))
            (let ()
              (declare (not safe))
              (##vector-set! _self3024_ '2 _conn3026_))
            (let ()
              (declare (not safe))
              (##vector-set! _self3024_ '3 _params3027_))
            (let ()
              (declare (not safe))
              (##vector-set! _self3024_ '4 _cols3028_)))
          (error '"struct-instance-init!: too many arguments for struct"
                 _self3024_))))
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   ':init!
   std/db/postgresql#postgresql-statement:::init!
   '#f)
  (define std/db/postgresql#postgresql-connect__%
    (lambda (_g8183_
             _host28582865_
             _port28592867_
             _user28602869_
             _passwd28612871_
             _db28622873_)
      (let* ((_host2876_
              (if (eq? _host28582865_ absent-value)
                  '"127.0.0.1"
                  _host28582865_))
             (_port2878_
              (if (eq? _port28592867_ absent-value) '5432 _port28592867_))
             (_user2880_
              (if (eq? _user28602869_ absent-value)
                  (error '"Missing required keyword argument" 'user:)
                  _user28602869_))
             (_passwd2882_
              (if (eq? _passwd28612871_ absent-value)
                  (error '"Missing required keyword argument" 'passwd:)
                  _passwd28612871_))
             (_db2884_ (if (eq? _db28622873_ absent-value) '#f _db28622873_))
             (_driver2886_
              (std/db/postgresql-driver#postgresql-connect!
               _host2876_
               _port2878_
               _user2880_
               _passwd2882_
               _db2884_)))
        (make-struct-instance
         std/db/postgresql#postgresql-connection::t
         _driver2886_))))
  (define std/db/postgresql#postgresql-connect__@
    (lambda (_keys28572891_ . _args2893_)
      (apply std/db/postgresql#postgresql-connect__%
             _keys28572891_
             (table-ref _keys28572891_ 'host: absent-value)
             (table-ref _keys28572891_ 'port: absent-value)
             (table-ref _keys28572891_ 'user: absent-value)
             (table-ref _keys28572891_ 'passwd: absent-value)
             (table-ref _keys28572891_ 'db: absent-value)
             _args2893_)))
  (define std/db/postgresql#postgresql-connect
    (lambda _args28632899_
      (apply keyword-dispatch
             '#(#f passwd: #f #f port: host: user: #f #f db:)
             std/db/postgresql#postgresql-connect__@
             _args28632899_)))
  (define std/db/postgresql#postgresql-connection::close
    (lambda (_self2854_)
      (std/db/postgresql-driver#postgresql-close! _self2854_)))
  (bind-method!
   std/db/postgresql#postgresql-connection::t
   'close
   std/db/postgresql#postgresql-connection::close
   '#f)
  (define std/db/postgresql#postgresql-connection::prepare
    (lambda (_self2723_ _sql2724_)
      (let* ((_name2726_ (symbol->string (gensym 'stmt)))
             (_g8184_ (std/db/postgresql-driver#postgresql-prepare-statement!
                       _self2723_
                       _name2726_
                       _sql2724_)))
        (begin
          (let ((_g8185_ (let ()
                           (declare (not safe))
                           (if (##values? _g8184_)
                               (##vector-length _g8184_)
                               1))))
            (if (not (let () (declare (not safe)) (##fx= _g8185_ 2)))
                (error "Context expects 2 values" _g8185_)))
          (let ((_params2728_
                 (let () (declare (not safe)) (##vector-ref _g8184_ 0)))
                (_cols2729_
                 (let () (declare (not safe)) (##vector-ref _g8184_ 1))))
            (let ()
              (let ((__obj8180
                     (make-object
                      std/db/postgresql#postgresql-statement::t
                      '8)))
                (if (let ((__tmp8186
                           (let ()
                             (declare (not safe))
                             (##vector-length __obj8180))))
                      (declare (not safe))
                      (##fx< '4 __tmp8186))
                    (begin
                      (let ()
                        (declare (not safe))
                        (##vector-set! __obj8180 '1 _name2726_))
                      (let ()
                        (declare (not safe))
                        (##vector-set! __obj8180 '2 _self2723_))
                      (let ()
                        (declare (not safe))
                        (##vector-set! __obj8180 '3 _params2728_))
                      (let ()
                        (declare (not safe))
                        (##vector-set! __obj8180 '4 _cols2729_)))
                    (error '"struct-instance-init!: too many arguments for struct"
                           __obj8180))
                __obj8180)))))))
  (bind-method!
   std/db/postgresql#postgresql-connection::t
   'prepare
   std/db/postgresql#postgresql-connection::prepare
   '#f)
  (define std/db/postgresql#postgresql-statement::finalize
    (lambda (_self2570_)
      (let* ((_self25712578_ _self2570_)
             (_E25732582_
              (lambda () (error '"No clause matching" _self25712578_)))
             (_K25742588_
              (lambda (_conn2585_ _name2586_)
                (std/db/postgresql#postgresql-statement::reset _self2570_)
                (std/db/postgresql-driver#postgresql-close-statement!
                 _conn2585_
                 _name2586_))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _self25712578_
               'std/db/postgresql#postgresql-statement::t))
            (let* ((_e25752591_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self25712578_ '1)))
                   (_name2594_ _e25752591_)
                   (_e25762596_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self25712578_ '2)))
                   (_conn2599_ _e25762596_))
              (_K25742588_ _conn2599_ _name2594_))
            (_E25732582_)))))
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'finalize
   std/db/postgresql#postgresql-statement::finalize
   '#f)
  (define std/db/postgresql#postgresql-statement::bind
    (lambda (_self2428_ . _args2429_)
      (letrec ((_value->binding2431_
                (lambda (_type-oid2438_ _arg2439_)
                  (if (not _arg2439_)
                      (if (fx= _type-oid2438_ '16)
                          (std/db/postgresql#serialize-boolean _arg2439_)
                          '#f)
                      (if (string? _arg2439_)
                          _arg2439_
                          (let ((_$e2441_
                                 (std/db/postgresql#catalog-serializer
                                  (std/db/postgresql#current-catalog)
                                  _type-oid2438_)))
                            (if _$e2441_
                                ((lambda (_g24432445_) (_g24432445_ _arg2439_))
                                 _$e2441_)
                                (error '"Cannot bind; unknown parameter type"
                                       _type-oid2438_
                                       _arg2439_))))))))
        (let* ((_params2433_
                (##direct-structure-ref
                 _self2428_
                 '3
                 std/db/postgresql#postgresql-statement::t
                 '#f))
               (_bind2435_ (map _value->binding2431_ _params2433_ _args2429_)))
          (##direct-structure-set!
           _self2428_
           _bind2435_
           '5
           std/db/postgresql#postgresql-statement::t
           '#f)
          '#!void))))
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'bind
   std/db/postgresql#postgresql-statement::bind
   '#f)
  (define std/db/postgresql#postgresql-statement::clear
    (lambda (_self2304_)
      (##direct-structure-set!
       _self2304_
       '#f
       '5
       std/db/postgresql#postgresql-statement::t
       '#f)))
  (define std/db/postgresql#postgresql-statement::clear::specialize
    (lambda (__t8113)
      (let* ((__class8114
              (struct-subtype?
               std/db/postgresql#postgresql-statement::t
               __t8113))
             (__specializer8115
              (lambda (_self2304_)
                (if __class8114
                    (let ()
                      (declare (not safe))
                      (##unchecked-structure-set!
                       _self2304_
                       '#f
                       '5
                       std/db/postgresql#postgresql-statement::t
                       '#f))
                    (error '"Type error; concrete type is not a subclass of expected type"
                           std/db/postgresql#postgresql-statement::t
                           _self2304_)))))
        (if __class8114
            std/db/postgresql#postgresql-statement::clear::specialize::unchecked
            __specializer8115))))
  (define std/db/postgresql#postgresql-statement::clear::specialize::unchecked
    (lambda (_self2304_)
      (let ()
        (declare (not safe))
        (##unchecked-structure-set!
         _self2304_
         '#f
         '5
         std/db/postgresql#postgresql-statement::t
         '#f))))
  (bind-specializer!
   std/db/postgresql#postgresql-statement::clear
   std/db/postgresql#postgresql-statement::clear::specialize)
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'clear
   std/db/postgresql#postgresql-statement::clear
   '#f)
  (define std/db/postgresql#postgresql-statement::reset
    (lambda (_self2174_)
      (let ((_token21752177_
             (##direct-structure-ref
              _self2174_
              '8
              std/db/postgresql#postgresql-statement::t
              '#f)))
        (if _token21752177_
            (let ((_token2180_ _token21752177_))
              (std/db/postgresql-driver#postgresql-reset!
               (##direct-structure-ref
                _self2174_
                '2
                std/db/postgresql#postgresql-statement::t
                '#f)
               _token2180_)
              (##direct-structure-set!
               _self2174_
               '#f
               '8
               std/db/postgresql#postgresql-statement::t
               '#f)
              (##direct-structure-set!
               _self2174_
               '#f
               '7
               std/db/postgresql#postgresql-statement::t
               '#f)
              (##direct-structure-set!
               _self2174_
               '#f
               '6
               std/db/postgresql#postgresql-statement::t
               '#f))
            '#f))))
  (define std/db/postgresql#postgresql-statement::reset::specialize
    (lambda (__t8116)
      (let* ((__class8117
              (struct-subtype?
               std/db/postgresql#postgresql-statement::t
               __t8116))
             (__specializer8118
              (lambda (_self2174_)
                (let ((_token21752177_
                       (if __class8117
                           (let ()
                             (declare (not safe))
                             (##unchecked-structure-ref
                              _self2174_
                              '8
                              std/db/postgresql#postgresql-statement::t
                              '#f))
                           (error '"Type error; concrete type is not a subclass of expected type"
                                  std/db/postgresql#postgresql-statement::t
                                  _self2174_))))
                  (if _token21752177_
                      (let ((_token2180_ _token21752177_))
                        (std/db/postgresql-driver#postgresql-reset!
                         (if __class8117
                             (let ()
                               (declare (not safe))
                               (##unchecked-structure-ref
                                _self2174_
                                '2
                                std/db/postgresql#postgresql-statement::t
                                '#f))
                             (error '"Type error; concrete type is not a subclass of expected type"
                                    std/db/postgresql#postgresql-statement::t
                                    _self2174_))
                         _token2180_)
                        (if __class8117
                            (let ()
                              (declare (not safe))
                              (##unchecked-structure-set!
                               _self2174_
                               '#f
                               '8
                               std/db/postgresql#postgresql-statement::t
                               '#f))
                            (error '"Type error; concrete type is not a subclass of expected type"
                                   std/db/postgresql#postgresql-statement::t
                                   _self2174_))
                        (if __class8117
                            (let ()
                              (declare (not safe))
                              (##unchecked-structure-set!
                               _self2174_
                               '#f
                               '7
                               std/db/postgresql#postgresql-statement::t
                               '#f))
                            (error '"Type error; concrete type is not a subclass of expected type"
                                   std/db/postgresql#postgresql-statement::t
                                   _self2174_))
                        (if __class8117
                            (let ()
                              (declare (not safe))
                              (##unchecked-structure-set!
                               _self2174_
                               '#f
                               '6
                               std/db/postgresql#postgresql-statement::t
                               '#f))
                            (error '"Type error; concrete type is not a subclass of expected type"
                                   std/db/postgresql#postgresql-statement::t
                                   _self2174_)))
                      '#f)))))
        (if __class8117
            std/db/postgresql#postgresql-statement::reset::specialize::unchecked
            __specializer8118))))
  (define std/db/postgresql#postgresql-statement::reset::specialize::unchecked
    (lambda (_self2174_)
      (let ((_token21752177_
             (let ()
               (declare (not safe))
               (##unchecked-structure-ref
                _self2174_
                '8
                std/db/postgresql#postgresql-statement::t
                '#f))))
        (if _token21752177_
            (let ((_token2180_ _token21752177_))
              (std/db/postgresql-driver#postgresql-reset!
               (let ()
                 (declare (not safe))
                 (##unchecked-structure-ref
                  _self2174_
                  '2
                  std/db/postgresql#postgresql-statement::t
                  '#f))
               _token2180_)
              (let ()
                (declare (not safe))
                (##unchecked-structure-set!
                 _self2174_
                 '#f
                 '8
                 std/db/postgresql#postgresql-statement::t
                 '#f))
              (let ()
                (declare (not safe))
                (##unchecked-structure-set!
                 _self2174_
                 '#f
                 '7
                 std/db/postgresql#postgresql-statement::t
                 '#f))
              (let ()
                (declare (not safe))
                (##unchecked-structure-set!
                 _self2174_
                 '#f
                 '6
                 std/db/postgresql#postgresql-statement::t
                 '#f)))
            '#f))))
  (bind-specializer!
   std/db/postgresql#postgresql-statement::reset
   std/db/postgresql#postgresql-statement::reset::specialize)
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'reset
   std/db/postgresql#postgresql-statement::reset
   '#f)
  (define std/db/postgresql#postgresql-statement::exec
    (lambda (_self2003_)
      (let* ((_self20042014_ _self2003_)
             (_E20062018_
              (lambda () (error '"No clause matching" _self20042014_)))
             (_K20072028_
              (lambda (_bind2021_ _conn2022_ _name2023_)
                (std/db/postgresql-driver#postgresql-exec!
                 _conn2022_
                 _name2023_
                 (let ((_$e2025_ _bind2021_)) (if _$e2025_ _$e2025_ '()))))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _self20042014_
               'std/db/postgresql#postgresql-statement::t))
            (let* ((_e20082031_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self20042014_ '1)))
                   (_name2034_ _e20082031_)
                   (_e20092036_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self20042014_ '2)))
                   (_conn2039_ _e20092036_)
                   (_e20102041_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self20042014_ '3)))
                   (_e20112044_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self20042014_ '4)))
                   (_e20122047_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self20042014_ '5)))
                   (_bind2050_ _e20122047_))
              (_K20072028_ _bind2050_ _conn2039_ _name2034_))
            (_E20062018_)))))
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'exec
   std/db/postgresql#postgresql-statement::exec
   '#f)
  (define std/db/postgresql#postgresql-statement::query-start
    (lambda (_self1829_)
      (let* ((_self18301840_ _self1829_)
             (_E18321844_
              (lambda () (error '"No clause matching" _self18301840_)))
             (_K18331857_
              (lambda (_bind1847_ _conn1848_ _name1849_)
                (let ((_g8187_ (std/db/postgresql-driver#postgresql-query!
                                _conn1848_
                                _name1849_
                                (let ((_$e1851_ _bind1847_))
                                  (if _$e1851_ _$e1851_ '())))))
                  (begin
                    (let ((_g8188_ (let ()
                                     (declare (not safe))
                                     (if (##values? _g8187_)
                                         (##vector-length _g8187_)
                                         1))))
                      (if (not (let () (declare (not safe)) (##fx= _g8188_ 2)))
                          (error "Context expects 2 values" _g8188_)))
                    (let ((_inp1854_
                           (let ()
                             (declare (not safe))
                             (##vector-ref _g8187_ 0)))
                          (_token1855_
                           (let ()
                             (declare (not safe))
                             (##vector-ref _g8187_ 1))))
                      (begin
                        (##direct-structure-set!
                         _self1829_
                         _token1855_
                         '8
                         std/db/postgresql#postgresql-statement::t
                         '#f)
                        (##direct-structure-set!
                         _self1829_
                         _inp1854_
                         '7
                         std/db/postgresql#postgresql-statement::t
                         '#f)
                        (##direct-structure-set!
                         _self1829_
                         '#f
                         '6
                         std/db/postgresql#postgresql-statement::t
                         '#f))))))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _self18301840_
               'std/db/postgresql#postgresql-statement::t))
            (let* ((_e18341860_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '1)))
                   (_name1863_ _e18341860_)
                   (_e18351865_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '2)))
                   (_conn1868_ _e18351865_)
                   (_e18361870_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '3)))
                   (_e18371873_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '4)))
                   (_e18381876_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '5)))
                   (_bind1879_ _e18381876_))
              (_K18331857_ _bind1879_ _conn1868_ _name1863_))
            (_E18321844_)))))
  (define std/db/postgresql#postgresql-statement::query-start::specialize
    (lambda (__t8119)
      (let* ((__class8120
              (struct-subtype?
               std/db/postgresql#postgresql-statement::t
               __t8119))
             (__specializer8121
              (lambda (_self1829_)
                (let* ((_self18301840_ _self1829_)
                       (_E18321844_
                        (lambda ()
                          (error '"No clause matching" _self18301840_)))
                       (_K18331857_
                        (lambda (_bind1847_ _conn1848_ _name1849_)
                          (let ((_g8189_ (std/db/postgresql-driver#postgresql-query!
                                          _conn1848_
                                          _name1849_
                                          (let ((_$e1851_ _bind1847_))
                                            (if _$e1851_ _$e1851_ '())))))
                            (begin
                              (let ((_g8190_ (let ()
                                               (declare (not safe))
                                               (if (##values? _g8189_)
                                                   (##vector-length _g8189_)
                                                   1))))
                                (if (not (let ()
                                           (declare (not safe))
                                           (##fx= _g8190_ 2)))
                                    (error "Context expects 2 values"
                                           _g8190_)))
                              (let ((_inp1854_
                                     (let ()
                                       (declare (not safe))
                                       (##vector-ref _g8189_ 0)))
                                    (_token1855_
                                     (let ()
                                       (declare (not safe))
                                       (##vector-ref _g8189_ 1))))
                                (begin
                                  (if __class8120
                                      (let ()
                                        (declare (not safe))
                                        (##unchecked-structure-set!
                                         _self1829_
                                         _token1855_
                                         '8
                                         std/db/postgresql#postgresql-statement::t
                                         '#f))
                                      (error '"Type error; concrete type is not a subclass of expected type"
                                             std/db/postgresql#postgresql-statement::t
                                             _self1829_))
                                  (if __class8120
                                      (let ()
                                        (declare (not safe))
                                        (##unchecked-structure-set!
                                         _self1829_
                                         _inp1854_
                                         '7
                                         std/db/postgresql#postgresql-statement::t
                                         '#f))
                                      (error '"Type error; concrete type is not a subclass of expected type"
                                             std/db/postgresql#postgresql-statement::t
                                             _self1829_))
                                  (if __class8120
                                      (let ()
                                        (declare (not safe))
                                        (##unchecked-structure-set!
                                         _self1829_
                                         '#f
                                         '6
                                         std/db/postgresql#postgresql-statement::t
                                         '#f))
                                      (error '"Type error; concrete type is not a subclass of expected type"
                                             std/db/postgresql#postgresql-statement::t
                                             _self1829_)))))))))
                  (if (let ()
                        (declare (not safe))
                        (##structure-direct-instance-of?
                         _self18301840_
                         'std/db/postgresql#postgresql-statement::t))
                      (let* ((_e18341860_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _self18301840_ '1)))
                             (_name1863_ _e18341860_)
                             (_e18351865_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _self18301840_ '2)))
                             (_conn1868_ _e18351865_)
                             (_e18361870_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _self18301840_ '3)))
                             (_e18371873_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _self18301840_ '4)))
                             (_e18381876_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _self18301840_ '5)))
                             (_bind1879_ _e18381876_))
                        (_K18331857_ _bind1879_ _conn1868_ _name1863_))
                      (_E18321844_))))))
        (if __class8120
            std/db/postgresql#postgresql-statement::query-start::specialize::unchecked
            __specializer8121))))
  (define std/db/postgresql#postgresql-statement::query-start::specialize::unchecked
    (lambda (_self1829_)
      (let* ((_self18301840_ _self1829_)
             (_E18321844_
              (lambda () (error '"No clause matching" _self18301840_)))
             (_K18331857_
              (lambda (_bind1847_ _conn1848_ _name1849_)
                (let ((_g8191_ (std/db/postgresql-driver#postgresql-query!
                                _conn1848_
                                _name1849_
                                (let ((_$e1851_ _bind1847_))
                                  (if _$e1851_ _$e1851_ '())))))
                  (begin
                    (let ((_g8192_ (let ()
                                     (declare (not safe))
                                     (if (##values? _g8191_)
                                         (##vector-length _g8191_)
                                         1))))
                      (if (not (let () (declare (not safe)) (##fx= _g8192_ 2)))
                          (error "Context expects 2 values" _g8192_)))
                    (let ((_inp1854_
                           (let ()
                             (declare (not safe))
                             (##vector-ref _g8191_ 0)))
                          (_token1855_
                           (let ()
                             (declare (not safe))
                             (##vector-ref _g8191_ 1))))
                      (begin
                        (let ()
                          (declare (not safe))
                          (##unchecked-structure-set!
                           _self1829_
                           _token1855_
                           '8
                           std/db/postgresql#postgresql-statement::t
                           '#f))
                        (let ()
                          (declare (not safe))
                          (##unchecked-structure-set!
                           _self1829_
                           _inp1854_
                           '7
                           std/db/postgresql#postgresql-statement::t
                           '#f))
                        (let ()
                          (declare (not safe))
                          (##unchecked-structure-set!
                           _self1829_
                           '#f
                           '6
                           std/db/postgresql#postgresql-statement::t
                           '#f)))))))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _self18301840_
               'std/db/postgresql#postgresql-statement::t))
            (let* ((_e18341860_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '1)))
                   (_name1863_ _e18341860_)
                   (_e18351865_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '2)))
                   (_conn1868_ _e18351865_)
                   (_e18361870_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '3)))
                   (_e18371873_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '4)))
                   (_e18381876_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _self18301840_ '5)))
                   (_bind1879_ _e18381876_))
              (_K18331857_ _bind1879_ _conn1868_ _name1863_))
            (_E18321844_)))))
  (bind-specializer!
   std/db/postgresql#postgresql-statement::query-start
   std/db/postgresql#postgresql-statement::query-start::specialize)
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'query-start
   std/db/postgresql#postgresql-statement::query-start
   '#f)
  (define std/db/postgresql#postgresql-statement::query-fetch
    (lambda (_self1670_)
      (letrec ((_result->row1672_
                (lambda (_cols1703_)
                  (let ((_res1705_
                         (map _result->value1673_
                              _cols1703_
                              (##direct-structure-ref
                               _self1670_
                               '4
                               std/db/postgresql#postgresql-statement::t
                               '#f))))
                    (if (null? _res1705_)
                        '#f
                        (if (null? (cdr _res1705_))
                            (car _res1705_)
                            (list->vector _res1705_))))))
               (_result->value1673_
                (lambda (_res1698_ _col1699_)
                  (if _res1698_
                      (let ((_type-oid1701_ (list-ref _col1699_ '3)))
                        (_value-e1674_ _res1698_ _type-oid1701_))
                      '#f)))
               (_value-e1674_
                (lambda (_res1688_ _type-oid1689_)
                  (let ((_$e1691_
                         (std/db/postgresql#catalog-deserializer
                          (std/db/postgresql#current-catalog)
                          _type-oid1689_)))
                    (if _$e1691_
                        ((lambda (_g16931695_) (_g16931695_ _res1688_))
                         _$e1691_)
                        _res1688_)))))
        (let ((_$e1676_
               (##direct-structure-ref
                _self1670_
                '7
                std/db/postgresql#postgresql-statement::t
                '#f)))
          (if _$e1676_
              ((lambda (_inp1679_)
                 (let _again1681_ ()
                   (let ((_next1684_
                          (std/misc/channel#channel-get__0 _inp1679_)))
                     (if (eof-object? _next1684_)
                         (begin
                           (##direct-structure-set!
                            _self1670_
                            '#f
                            '8
                            std/db/postgresql#postgresql-statement::t
                            '#f)
                           (##direct-structure-set!
                            _self1670_
                            '#f
                            '7
                            std/db/postgresql#postgresql-statement::t
                            '#f)
                           (##direct-structure-set!
                            _self1670_
                            '#f
                            '6
                            std/db/postgresql#postgresql-statement::t
                            '#f)
                           std/iter#iter-end)
                         (if (exception? _next1684_)
                             (raise _next1684_)
                             (if (let ()
                                   (declare (not safe))
                                   (##structure-direct-instance-of?
                                    _next1684_
                                    'std/actor/proto#!token::t))
                                 (begin
                                   (std/db/postgresql-driver#postgresql-continue!
                                    (##direct-structure-ref
                                     _self1670_
                                     '2
                                     std/db/postgresql#postgresql-statement::t
                                     '#f)
                                    _next1684_)
                                   (_again1681_))
                                 (let ((_row1686_
                                        (_result->row1672_ _next1684_)))
                                   (##direct-structure-set!
                                    _self1670_
                                    _row1686_
                                    '6
                                    std/db/postgresql#postgresql-statement::t
                                    '#f)
                                   '#!void)))))))
               _$e1676_)
              std/iter#iter-end)))))
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'query-fetch
   std/db/postgresql#postgresql-statement::query-fetch
   '#f)
  (define std/db/postgresql#postgresql-statement::query-row
    (lambda (_self1546_)
      (##direct-structure-ref
       _self1546_
       '6
       std/db/postgresql#postgresql-statement::t
       '#f)))
  (define std/db/postgresql#postgresql-statement::query-row::specialize
    (lambda (__t8122)
      (let* ((__class8123
              (struct-subtype?
               std/db/postgresql#postgresql-statement::t
               __t8122))
             (__specializer8124
              (lambda (_self1546_)
                (if __class8123
                    (let ()
                      (declare (not safe))
                      (##unchecked-structure-ref
                       _self1546_
                       '6
                       std/db/postgresql#postgresql-statement::t
                       '#f))
                    (error '"Type error; concrete type is not a subclass of expected type"
                           std/db/postgresql#postgresql-statement::t
                           _self1546_)))))
        (if __class8123
            std/db/postgresql#postgresql-statement::query-row::specialize::unchecked
            __specializer8124))))
  (define std/db/postgresql#postgresql-statement::query-row::specialize::unchecked
    (lambda (_self1546_)
      (let ()
        (declare (not safe))
        (##unchecked-structure-ref
         _self1546_
         '6
         std/db/postgresql#postgresql-statement::t
         '#f))))
  (bind-specializer!
   std/db/postgresql#postgresql-statement::query-row
   std/db/postgresql#postgresql-statement::query-row::specialize)
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'query-row
   std/db/postgresql#postgresql-statement::query-row
   '#f)
  (define std/db/postgresql#postgresql-statement::query-fini
    std/db/postgresql#postgresql-statement::reset)
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'query-fini
   std/db/postgresql#postgresql-statement::query-fini
   '#f)
  (define std/db/postgresql#postgresql-statement::columns
    (lambda (_self1300_)
      (map car
           (##direct-structure-ref
            _self1300_
            '4
            std/db/postgresql#postgresql-statement::t
            '#f))))
  (define std/db/postgresql#postgresql-statement::columns::specialize
    (lambda (__t8125)
      (let* ((__class8126
              (struct-subtype?
               std/db/postgresql#postgresql-statement::t
               __t8125))
             (__specializer8127
              (lambda (_self1300_)
                (map car
                     (if __class8126
                         (let ()
                           (declare (not safe))
                           (##unchecked-structure-ref
                            _self1300_
                            '4
                            std/db/postgresql#postgresql-statement::t
                            '#f))
                         (error '"Type error; concrete type is not a subclass of expected type"
                                std/db/postgresql#postgresql-statement::t
                                _self1300_))))))
        (if __class8126
            std/db/postgresql#postgresql-statement::columns::specialize::unchecked
            __specializer8127))))
  (define std/db/postgresql#postgresql-statement::columns::specialize::unchecked
    (lambda (_self1300_)
      (map car
           (let ()
             (declare (not safe))
             (##unchecked-structure-ref
              _self1300_
              '4
              std/db/postgresql#postgresql-statement::t
              '#f)))))
  (bind-specializer!
   std/db/postgresql#postgresql-statement::columns
   std/db/postgresql#postgresql-statement::columns::specialize)
  (bind-method!
   std/db/postgresql#postgresql-statement::t
   'columns
   std/db/postgresql#postgresql-statement::columns
   '#f)
  (define std/db/postgresql#catalog::t
    (make-struct-type
     'std/db/postgresql#catalog::t
     '#f
     '2
     'catalog
     '((final: . #t))
     ':init!
     '(s d)))
  (define std/db/postgresql#catalog?
    (make-struct-predicate std/db/postgresql#catalog::t))
  (define std/db/postgresql#make-catalog
    (lambda _$args1175_
      (apply make-struct-instance std/db/postgresql#catalog::t _$args1175_)))
  (define std/db/postgresql#catalog-s
    (make-struct-field-accessor std/db/postgresql#catalog::t '0))
  (define std/db/postgresql#catalog-d
    (make-struct-field-accessor std/db/postgresql#catalog::t '1))
  (define std/db/postgresql#catalog-s-set!
    (make-struct-field-mutator std/db/postgresql#catalog::t '0))
  (define std/db/postgresql#catalog-d-set!
    (make-struct-field-mutator std/db/postgresql#catalog::t '1))
  (define std/db/postgresql#catalog:::init!
    (lambda (_self1167_ . _mixin1168_)
      (let ((_s1170_ (make-table 'test: eq?))
            (_d1171_ (make-table 'test: eq?)))
        (for-each
         (lambda (_mixin1173_)
           (hash-merge!
            _s1170_
            (##direct-structure-ref
             _mixin1173_
             '1
             std/db/postgresql#catalog::t
             '#f))
           (hash-merge!
            _d1171_
            (##direct-structure-ref
             _mixin1173_
             '2
             std/db/postgresql#catalog::t
             '#f)))
         _mixin1168_)
        (if (let ((__tmp8193
                   (let () (declare (not safe)) (##vector-length _self1167_))))
              (declare (not safe))
              (##fx< '2 __tmp8193))
            (begin
              (let ()
                (declare (not safe))
                (##vector-set! _self1167_ '1 _s1170_))
              (let ()
                (declare (not safe))
                (##vector-set! _self1167_ '2 _d1171_)))
            (error '"struct-instance-init!: too many arguments for struct"
                   _self1167_)))))
  (bind-method!
   std/db/postgresql#catalog::t
   ':init!
   std/db/postgresql#catalog:::init!
   '#f)
  (define std/db/postgresql#catalog-serializer
    (lambda (_c1042_ _oid1043_)
      (table-ref
       (##direct-structure-ref _c1042_ '1 std/db/postgresql#catalog::t '#f)
       _oid1043_
       '#f)))
  (define std/db/postgresql#catalog-deserializer
    (lambda (_c1039_ _oid1040_)
      (table-ref
       (##direct-structure-ref _c1039_ '2 std/db/postgresql#catalog::t '#f)
       _oid1040_
       '#f)))
  (define std/db/postgresql#serialize-boolean
    (lambda (_arg1037_) (if _arg1037_ '"t" '"f")))
  (define std/db/postgresql#deserialize-boolean
    (lambda (_str1035_)
      (if (member _str1035_ '("t" "true" "TRUE" "y" "yes" "on" "1")) '#t '#f)))
  (define std/db/postgresql#serialize-date
    (lambda (_date1033_) (std/srfi/19#date->string _date1033_ '"~Y-~m-~d")))
  (define std/db/postgresql#deserialize-date
    (lambda (_str1031_) (std/srfi/19#string->date _str1031_ '"~Y-~m-~d")))
  (define std/db/postgresql#serialize-timestamp
    (lambda (_date1029_)
      (std/srfi/19#date->string _date1029_ '"~Y-~m-~d ~H:~M:~S")))
  (define std/db/postgresql#deserialize-timestamp
    (lambda (_str1027_)
      (std/srfi/19#string->date _str1027_ '"~Y-~m-~d ~H:~M:~S")))
  (define std/db/postgresql#serialize-timestamptz
    (lambda (_date1025_)
      (std/srfi/19#date->string _date1025_ '"~Y-~m-~d ~H:~M:~S~z")))
  (define std/db/postgresql#deserialize-timestamptz
    (lambda (_str1023_)
      (std/srfi/19#string->date _str1023_ '"~Y-~m-~d ~H:~M:~S~z")))
  (define std/db/postgresql#identity-string
    (lambda (_obj1021_)
      (if (string? _obj1021_)
          _obj1021_
          (error '"Bad argument; expected string" _obj1021_))))
  (define std/db/postgresql#default-catalog
    (let ((__obj8181 (make-object std/db/postgresql#catalog::t '2)))
      (std/db/postgresql#catalog:::init! __obj8181)
      __obj8181))
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '16
   std/db/postgresql#serialize-boolean)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '16
   std/db/postgresql#deserialize-boolean)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '20
   number->string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '21
   number->string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '23
   number->string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '700
   number->string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '701
   number->string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '1700
   number->string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '20
   string->number)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '21
   string->number)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '23
   string->number)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '700
   string->number)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '701
   string->number)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '1700
   string->number)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '18
   std/db/postgresql#identity-string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '25
   std/db/postgresql#identity-string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '1042
   std/db/postgresql#identity-string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '1043
   std/db/postgresql#identity-string)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '18
   identity)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '25
   identity)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '1042
   identity)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '1043
   identity)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '1082
   std/db/postgresql#serialize-date)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '1082
   std/db/postgresql#deserialize-date)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '1114
   std/db/postgresql#serialize-timestamp)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '1114
   std/db/postgresql#deserialize-timestamp)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '1
    std/db/postgresql#catalog::t
    '#f)
   '1184
   std/db/postgresql#serialize-timestamptz)
  (table-set!
   (##direct-structure-ref
    std/db/postgresql#default-catalog
    '2
    std/db/postgresql#catalog::t
    '#f)
   '1184
   std/db/postgresql#deserialize-timestamptz)
  (define std/db/postgresql#current-catalog
    (make-parameter std/db/postgresql#default-catalog)))
