-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathFromRow.hs
1535 lines (1474 loc) · 123 KB
/
FromRow.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
module Database.PostgreSQL.PQTypes.FromRow
( FromRow (..)
, fromRow'
) where
import Control.Exception qualified as E
import Data.ByteString.Unsafe qualified as BS
import Data.Functor.Identity
import Foreign.C
import Foreign.Marshal.Alloc
import Foreign.Ptr
import Foreign.Storable
import Database.PostgreSQL.PQTypes.Format
import Database.PostgreSQL.PQTypes.FromSQL
import Database.PostgreSQL.PQTypes.Internal.C.Get
import Database.PostgreSQL.PQTypes.Internal.C.Interface
import Database.PostgreSQL.PQTypes.Internal.C.Types
import Database.PostgreSQL.PQTypes.Internal.Error
import Database.PostgreSQL.PQTypes.Internal.Utils
-- | Convert base (libpqtypes) type to destination type.
convert :: FromSQL t => Ptr PGresult -> CInt -> CInt -> PQBase t -> IO t
convert res tuple column base = do
isNull <- c_PQgetisnull res tuple column
fromSQL (if isNull == 1 then Nothing else Just base)
`E.catch` rethrowWithConvError
where
rethrowWithConvError :: E.SomeException -> IO a
rethrowWithConvError (E.SomeException e) = do
colname <- safePeekCString' =<< c_PQfname res column
E.throwIO
ConversionError
{ convColumn = fromIntegral column + 1
, convColumnName = colname
, convRow = fromIntegral tuple + 1
, convError = e
}
-- | 'verifyPQTRes' specialized for usage in 'fromRow'.
verify :: Ptr PGerror -> CInt -> IO ()
verify err = verifyPQTRes err "fromRow"
withFormat :: forall row. FromRow row => (CString -> IO row) -> IO row
withFormat = BS.unsafeUseAsCString $ pqFormat0 @row
----------------------------------------
-- | More convenient version of 'fromRow' that allocates 'PGerror' by itself.
fromRow' :: forall row. FromRow row => Ptr PGresult -> CInt -> CInt -> IO row
fromRow' res b i = alloca $ \err -> fromRow res err b i
-- | Class which represents \"from SQL row to Haskell tuple\" transformation.
class PQFormat row => FromRow row where
-- | Extract SQL row from 'PGresult' and convert it into a tuple.
fromRow
:: Ptr PGresult
-- ^ Source result.
-> Ptr PGerror
-- ^ Local error info.
-> CInt
-- ^ Base position for c_PQgetf.
-> CInt
-- ^ Index of row to be extracted.
-> IO row
{- FOURMOLU_DISABLE -}
instance
( FromRow row1, FromRow row2
) => FromRow (row1 :*: row2) where
fromRow res err b i = (:*:)
<$> fromRow res err b i
<*> fromRow res err b' i
where
b' = b + fromIntegral (pqVariables @row1)
instance FromRow () where
fromRow _ _ _ _ = pure ()
instance FromSQL t => FromRow (Identity t) where
fromRow res err b i = withFormat $ \fmt -> alloca $ \p1 -> do
verify err =<< c_PQgetf1 res err i fmt b p1
t <- peek p1 >>= convert res i b
pure (Identity t)
instance
( FromSQL t1, FromSQL t2
) => FromRow (t1, t2) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> do
verify err =<< c_PQgetf2 res err i fmt b p0 (b+1) p1
(,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
instance
( FromSQL t1, FromSQL t2, FromSQL t3
) => FromRow (t1, t2, t3) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> do
verify err =<< c_PQgetf3 res err i fmt b p0 (b+1) p1 (b+2) p2
(,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4
) => FromRow (t1, t2, t3, t4) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> do
verify err =<< c_PQgetf4 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3
(,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5
) => FromRow (t1, t2, t3, t4, t5) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 -> do
verify err =<< c_PQgetf5 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4
(,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
) => FromRow (t1, t2, t3, t4, t5, t6) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> do
verify err =<< c_PQgetf6 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5
(,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7
) => FromRow (t1, t2, t3, t4, t5, t6, t7) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> do
verify err =<< c_PQgetf7 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6
(,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> do
verify err =<< c_PQgetf8 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7
(,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> do
verify err =<< c_PQgetf9 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8
(,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 -> do
verify err =<< c_PQgetf10 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9
(,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> do
verify err =<< c_PQgetf11 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10
(,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> do
verify err =<< c_PQgetf12 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11
(,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> do
verify err =<< c_PQgetf13 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12
(,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> do
verify err =<< c_PQgetf14 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13
(,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 -> do
verify err =<< c_PQgetf15 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14
(,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> do
verify err =<< c_PQgetf16 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15
(,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> do
verify err =<< c_PQgetf17 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16
(,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> do
verify err =<< c_PQgetf18 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17
(,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> do
verify err =<< c_PQgetf19 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18
(,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 -> do
verify err =<< c_PQgetf20 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19
(,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> do
verify err =<< c_PQgetf21 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20
(,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> do
verify err =<< c_PQgetf22 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21
(,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> do
verify err =<< c_PQgetf23 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22
(,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> do
verify err =<< c_PQgetf24 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23
(,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 -> do
verify err =<< c_PQgetf25 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24
(,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> do
verify err =<< c_PQgetf26 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25
(,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> do
verify err =<< c_PQgetf27 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26
(,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> do
verify err =<< c_PQgetf28 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27
(,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> do
verify err =<< c_PQgetf29 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 -> do
verify err =<< c_PQgetf30 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 ->
alloca $ \p30 -> do
verify err =<< c_PQgetf31 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29 (b+30) p30
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
<*> (peek p30 >>= convert res i (b+30))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31, FromSQL t32
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 ->
alloca $ \p30 -> alloca $ \p31 -> do
verify err =<< c_PQgetf32 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29 (b+30) p30 (b+31) p31
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
<*> (peek p30 >>= convert res i (b+30)) <*> (peek p31 >>= convert res i (b+31))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31, FromSQL t32, FromSQL t33
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 ->
alloca $ \p30 -> alloca $ \p31 -> alloca $ \p32 -> do
verify err =<< c_PQgetf33 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29 (b+30) p30 (b+31) p31 (b+32) p32
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
<*> (peek p30 >>= convert res i (b+30)) <*> (peek p31 >>= convert res i (b+31))
<*> (peek p32 >>= convert res i (b+32))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31, FromSQL t32, FromSQL t33, FromSQL t34
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33, t34) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 ->
alloca $ \p30 -> alloca $ \p31 -> alloca $ \p32 -> alloca $ \p33 -> do
verify err =<< c_PQgetf34 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29 (b+30) p30 (b+31) p31 (b+32) p32 (b+33) p33
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
<*> (peek p30 >>= convert res i (b+30)) <*> (peek p31 >>= convert res i (b+31))
<*> (peek p32 >>= convert res i (b+32)) <*> (peek p33 >>= convert res i (b+33))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31, FromSQL t32, FromSQL t33, FromSQL t34, FromSQL t35
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33, t34, t35) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 ->
alloca $ \p30 -> alloca $ \p31 -> alloca $ \p32 -> alloca $ \p33 -> alloca $ \p34 -> do
verify err =<< c_PQgetf35 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29 (b+30) p30 (b+31) p31 (b+32) p32 (b+33) p33 (b+34) p34
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
<*> (peek p30 >>= convert res i (b+30)) <*> (peek p31 >>= convert res i (b+31))
<*> (peek p32 >>= convert res i (b+32)) <*> (peek p33 >>= convert res i (b+33))
<*> (peek p34 >>= convert res i (b+34))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31, FromSQL t32, FromSQL t33, FromSQL t34, FromSQL t35, FromSQL t36
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33, t34, t35, t36) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 ->
alloca $ \p30 -> alloca $ \p31 -> alloca $ \p32 -> alloca $ \p33 -> alloca $ \p34 ->
alloca $ \p35 -> do
verify err =<< c_PQgetf36 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29 (b+30) p30 (b+31) p31 (b+32) p32 (b+33) p33 (b+34) p34 (b+35) p35
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
<*> (peek p30 >>= convert res i (b+30)) <*> (peek p31 >>= convert res i (b+31))
<*> (peek p32 >>= convert res i (b+32)) <*> (peek p33 >>= convert res i (b+33))
<*> (peek p34 >>= convert res i (b+34)) <*> (peek p35 >>= convert res i (b+35))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31, FromSQL t32, FromSQL t33, FromSQL t34, FromSQL t35, FromSQL t36
, FromSQL t37
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33, t34, t35, t36, t37) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 ->
alloca $ \p30 -> alloca $ \p31 -> alloca $ \p32 -> alloca $ \p33 -> alloca $ \p34 ->
alloca $ \p35 -> alloca $ \p36 -> do
verify err =<< c_PQgetf37 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29 (b+30) p30 (b+31) p31 (b+32) p32 (b+33) p33 (b+34) p34 (b+35) p35 (b+36) p36
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
<*> (peek p30 >>= convert res i (b+30)) <*> (peek p31 >>= convert res i (b+31))
<*> (peek p32 >>= convert res i (b+32)) <*> (peek p33 >>= convert res i (b+33))
<*> (peek p34 >>= convert res i (b+34)) <*> (peek p35 >>= convert res i (b+35))
<*> (peek p36 >>= convert res i (b+36))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31, FromSQL t32, FromSQL t33, FromSQL t34, FromSQL t35, FromSQL t36
, FromSQL t37, FromSQL t38
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33, t34, t35, t36, t37, t38) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->
alloca $ \p5 -> alloca $ \p6 -> alloca $ \p7 -> alloca $ \p8 -> alloca $ \p9 ->
alloca $ \p10 -> alloca $ \p11 -> alloca $ \p12 -> alloca $ \p13 -> alloca $ \p14 ->
alloca $ \p15 -> alloca $ \p16 -> alloca $ \p17 -> alloca $ \p18 -> alloca $ \p19 ->
alloca $ \p20 -> alloca $ \p21 -> alloca $ \p22 -> alloca $ \p23 -> alloca $ \p24 ->
alloca $ \p25 -> alloca $ \p26 -> alloca $ \p27 -> alloca $ \p28 -> alloca $ \p29 ->
alloca $ \p30 -> alloca $ \p31 -> alloca $ \p32 -> alloca $ \p33 -> alloca $ \p34 ->
alloca $ \p35 -> alloca $ \p36 -> alloca $ \p37 -> do
verify err =<< c_PQgetf38 res err i fmt b p0 (b+1) p1 (b+2) p2 (b+3) p3 (b+4) p4 (b+5) p5 (b+6) p6 (b+7) p7 (b+8) p8 (b+9) p9 (b+10) p10 (b+11) p11 (b+12) p12 (b+13) p13 (b+14) p14 (b+15) p15 (b+16) p16 (b+17) p17 (b+18) p18 (b+19) p19 (b+20) p20 (b+21) p21 (b+22) p22 (b+23) p23 (b+24) p24 (b+25) p25 (b+26) p26 (b+27) p27 (b+28) p28 (b+29) p29 (b+30) p30 (b+31) p31 (b+32) p32 (b+33) p33 (b+34) p34 (b+35) p35 (b+36) p36 (b+37) p37
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
<$> (peek p0 >>= convert res i b) <*> (peek p1 >>= convert res i (b+1))
<*> (peek p2 >>= convert res i (b+2)) <*> (peek p3 >>= convert res i (b+3))
<*> (peek p4 >>= convert res i (b+4)) <*> (peek p5 >>= convert res i (b+5))
<*> (peek p6 >>= convert res i (b+6)) <*> (peek p7 >>= convert res i (b+7))
<*> (peek p8 >>= convert res i (b+8)) <*> (peek p9 >>= convert res i (b+9))
<*> (peek p10 >>= convert res i (b+10)) <*> (peek p11 >>= convert res i (b+11))
<*> (peek p12 >>= convert res i (b+12)) <*> (peek p13 >>= convert res i (b+13))
<*> (peek p14 >>= convert res i (b+14)) <*> (peek p15 >>= convert res i (b+15))
<*> (peek p16 >>= convert res i (b+16)) <*> (peek p17 >>= convert res i (b+17))
<*> (peek p18 >>= convert res i (b+18)) <*> (peek p19 >>= convert res i (b+19))
<*> (peek p20 >>= convert res i (b+20)) <*> (peek p21 >>= convert res i (b+21))
<*> (peek p22 >>= convert res i (b+22)) <*> (peek p23 >>= convert res i (b+23))
<*> (peek p24 >>= convert res i (b+24)) <*> (peek p25 >>= convert res i (b+25))
<*> (peek p26 >>= convert res i (b+26)) <*> (peek p27 >>= convert res i (b+27))
<*> (peek p28 >>= convert res i (b+28)) <*> (peek p29 >>= convert res i (b+29))
<*> (peek p30 >>= convert res i (b+30)) <*> (peek p31 >>= convert res i (b+31))
<*> (peek p32 >>= convert res i (b+32)) <*> (peek p33 >>= convert res i (b+33))
<*> (peek p34 >>= convert res i (b+34)) <*> (peek p35 >>= convert res i (b+35))
<*> (peek p36 >>= convert res i (b+36)) <*> (peek p37 >>= convert res i (b+37))
instance
( FromSQL t1, FromSQL t2, FromSQL t3, FromSQL t4, FromSQL t5, FromSQL t6
, FromSQL t7, FromSQL t8, FromSQL t9, FromSQL t10, FromSQL t11, FromSQL t12
, FromSQL t13, FromSQL t14, FromSQL t15, FromSQL t16, FromSQL t17, FromSQL t18
, FromSQL t19, FromSQL t20, FromSQL t21, FromSQL t22, FromSQL t23, FromSQL t24
, FromSQL t25, FromSQL t26, FromSQL t27, FromSQL t28, FromSQL t29, FromSQL t30
, FromSQL t31, FromSQL t32, FromSQL t33, FromSQL t34, FromSQL t35, FromSQL t36
, FromSQL t37, FromSQL t38, FromSQL t39
) => FromRow (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33, t34, t35, t36, t37, t38, t39) where
fromRow res err b i = withFormat $ \fmt ->
alloca $ \p0 -> alloca $ \p1 -> alloca $ \p2 -> alloca $ \p3 -> alloca $ \p4 ->