74
76
static gchar** sql_heavy_record_real_field_names (SQLHeavyRecord* self, int* result_length1) {
75
77
gchar** result = NULL;
77
gchar** _tmp1_ = NULL;
82
78
GError * _inner_error_ = NULL;
83
_tmp0_ = sql_heavy_record_get_field_count (self);
84
_tmp1_ = g_new0 (gchar*, _tmp0_ + 1);
86
fields_length1 = _tmp0_;
87
_fields_size_ = _tmp0_;
82
gchar** _tmp2_ = NULL;
88
_tmp0_ = sql_heavy_record_get_field_count (self);
90
_tmp2_ = g_new0 (gchar*, _tmp1_ + 1);
92
fields_length1 = _tmp1_;
93
_fields_size_ = fields_length1;
102
if (!(i < fields_length1)) {
105
_tmp3_ = sql_heavy_record_field_name (self, i, &_inner_error_);
107
if (_inner_error_ != NULL) {
108
fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL);
109
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
110
goto __catch27_sql_heavy_error;
112
fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL);
113
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
114
g_clear_error (&_inner_error_);
118
_g_free0 (fields[i]);
106
gchar* _tmp9_ = NULL;
109
gint _tmp11__length1;
121
_tmp7__length1 = fields_length1;
122
if (!(_tmp6_ < _tmp7__length1)) {
126
_tmp9_ = sql_heavy_record_field_name (self, _tmp8_, &_inner_error_);
128
if (_inner_error_ != NULL) {
129
fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL);
130
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
131
goto __catch27_sql_heavy_error;
133
fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL);
134
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
135
g_clear_error (&_inner_error_);
139
_tmp11__length1 = fields_length1;
141
_g_free0 (_tmp11_[_tmp12_]);
142
_tmp11_[_tmp12_] = _tmp10_;
143
_tmp13_ = _tmp11_[_tmp12_];
124
if (result_length1) {
125
*result_length1 = fields_length1;
129
fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL);
148
_tmp14__length1 = fields_length1;
149
if (result_length1) {
150
*result_length1 = _tmp14__length1;
130
155
goto __finally27;
131
156
__catch27_sql_heavy_error:
134
159
e = _inner_error_;
135
160
_inner_error_ = NULL;
136
161
g_assert_not_reached ();
202
230
GError * _inner_error_ = NULL;
203
231
g_return_val_if_fail (field != NULL, NULL);
204
_tmp0_ = sql_heavy_record_field_index (self, field, &_inner_error_);
233
_tmp1_ = sql_heavy_record_field_index (self, _tmp0_, &_inner_error_);
206
235
if (_inner_error_ != NULL) {
207
236
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
208
237
g_propagate_error (error, _inner_error_);
262
292
static SQLHeavyRow* sql_heavy_record_real_get_foreign_row (SQLHeavyRecord* self, const gchar* field, GError** error) {
263
293
SQLHeavyRow* result = NULL;
266
SQLHeavyRow* _tmp2_ = NULL;
297
SQLHeavyRow* _tmp3_ = NULL;
268
299
GError * _inner_error_ = NULL;
269
300
g_return_val_if_fail (field != NULL, NULL);
270
_tmp0_ = sql_heavy_record_field_index (self, field, &_inner_error_);
272
if (_inner_error_ != NULL) {
273
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
274
g_propagate_error (error, _inner_error_);
277
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
278
g_clear_error (&_inner_error_);
282
_tmp2_ = sql_heavy_record_fetch_foreign_row (self, _tmp1_, &_inner_error_);
284
if (_inner_error_ != NULL) {
285
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
286
g_propagate_error (error, _inner_error_);
289
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
290
g_clear_error (&_inner_error_);
302
_tmp1_ = sql_heavy_record_field_index (self, _tmp0_, &_inner_error_);
304
if (_inner_error_ != NULL) {
305
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
306
g_propagate_error (error, _inner_error_);
309
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
310
g_clear_error (&_inner_error_);
314
_tmp3_ = sql_heavy_record_fetch_foreign_row (self, _tmp2_, &_inner_error_);
316
if (_inner_error_ != NULL) {
317
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
318
g_propagate_error (error, _inner_error_);
321
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
322
g_clear_error (&_inner_error_);
299
331
SQLHeavyRow* sql_heavy_record_get_foreign_row (SQLHeavyRecord* self, const gchar* field, GError** error) {
332
g_return_val_if_fail (self != NULL, NULL);
300
333
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->get_foreign_row (self, field, error);
310
343
static GValueArray* sql_heavy_record_real_fetch_row (SQLHeavyRecord* self, GError** error) {
311
344
GValueArray* result = NULL;
314
GValueArray* _tmp1_ = NULL;
315
350
GValueArray* data;
316
351
GError * _inner_error_ = NULL;
317
352
_tmp0_ = sql_heavy_record_get_field_count (self);
319
_tmp1_ = g_value_array_new ((guint) fields);
356
_tmp3_ = g_value_array_new ((guint) _tmp2_);
369
GValue _tmp10_ = {0};
371
GValueArray* _tmp12_;
382
if (!(_tmp7_ < _tmp8_)) {
339
sql_heavy_record_fetch (self, c, &_tmp3_, &_inner_error_);
386
sql_heavy_record_fetch (self, _tmp9_, &_tmp10_, &_inner_error_);
342
388
if (_inner_error_ != NULL) {
343
389
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
344
390
g_propagate_error (error, _inner_error_);
378
426
static void sql_heavy_record_real_fetch_with_type (SQLHeavyRecord* self, GType requested_type, gint field, GValue* result, GError** error) {
380
428
GValue _tmp1_ = {0};
431
gboolean _tmp3_ = FALSE;
384
432
GValue _tmp4_ = {0};
385
433
GValue transformed_val;
434
gboolean _tmp5_ = FALSE;
388
436
const gchar* _tmp7_ = NULL;
389
const gchar* _tmp8_ = NULL;
390
GError* _tmp9_ = NULL;
438
const gchar* _tmp9_ = NULL;
391
440
GError * _inner_error_ = NULL;
392
sql_heavy_record_fetch (self, field, &_tmp0_, &_inner_error_);
442
sql_heavy_record_fetch (self, _tmp0_, &_tmp1_, &_inner_error_);
395
444
if (_inner_error_ != NULL) {
396
445
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
419
468
_tmp6_ = G_VALUE_TYPE (&val);
420
469
_tmp7_ = g_type_name (_tmp6_);
421
_tmp8_ = g_type_name (requested_type);
422
_tmp9_ = g_error_new (SQL_HEAVY_ERROR, SQL_HEAVY_ERROR_DATA_TYPE, "Unable to transform %s to %s.", _tmp7_, _tmp8_);
423
_inner_error_ = _tmp9_;
470
_tmp8_ = requested_type;
471
_tmp9_ = g_type_name (_tmp8_);
472
_tmp10_ = g_error_new (SQL_HEAVY_ERROR, SQL_HEAVY_ERROR_DATA_TYPE, "Unable to transform %s to %s.", _tmp7_, _tmp9_);
473
_inner_error_ = _tmp10_;
424
474
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
425
475
g_propagate_error (error, _inner_error_);
426
476
G_IS_VALUE (&transformed_val) ? (g_value_unset (&transformed_val), NULL) : NULL;
454
505
static gchar* sql_heavy_record_real_fetch_string (SQLHeavyRecord* self, gint field, GError** error) {
455
506
gchar* result = NULL;
457
508
GValue _tmp1_ = {0};
460
const gchar* _tmp4_ = NULL;
510
const gchar* _tmp3_ = NULL;
463
512
GError * _inner_error_ = NULL;
464
sql_heavy_record_fetch_with_type (self, G_TYPE_STRING, field, &_tmp0_, &_inner_error_);
514
sql_heavy_record_fetch_with_type (self, G_TYPE_STRING, _tmp0_, &_tmp1_, &_inner_error_);
467
516
if (_inner_error_ != NULL) {
468
517
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
478
_tmp4_ = g_value_get_string (&_tmp3_);
479
_tmp5_ = g_strdup (_tmp4_);
481
G_IS_VALUE (&_tmp3_) ? (g_value_unset (&_tmp3_), NULL) : NULL;
526
_tmp3_ = g_value_get_string (&_tmp2_);
527
_tmp4_ = g_strdup (_tmp3_);
487
533
gchar* sql_heavy_record_fetch_string (SQLHeavyRecord* self, gint field, GError** error) {
534
g_return_val_if_fail (self != NULL, NULL);
488
535
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->fetch_string (self, field, error);
500
547
static gchar* sql_heavy_record_real_get_string (SQLHeavyRecord* self, const gchar* field, GError** error) {
501
548
gchar* result = NULL;
504
gchar* _tmp2_ = NULL;
552
gchar* _tmp3_ = NULL;
506
554
GError * _inner_error_ = NULL;
507
555
g_return_val_if_fail (field != NULL, NULL);
508
_tmp0_ = sql_heavy_record_field_index (self, field, &_inner_error_);
510
if (_inner_error_ != NULL) {
511
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
512
g_propagate_error (error, _inner_error_);
515
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
516
g_clear_error (&_inner_error_);
520
_tmp2_ = sql_heavy_record_fetch_string (self, _tmp1_, &_inner_error_);
522
if (_inner_error_ != NULL) {
523
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
524
g_propagate_error (error, _inner_error_);
527
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
528
g_clear_error (&_inner_error_);
557
_tmp1_ = sql_heavy_record_field_index (self, _tmp0_, &_inner_error_);
559
if (_inner_error_ != NULL) {
560
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
561
g_propagate_error (error, _inner_error_);
564
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
565
g_clear_error (&_inner_error_);
569
_tmp3_ = sql_heavy_record_fetch_string (self, _tmp2_, &_inner_error_);
571
if (_inner_error_ != NULL) {
572
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
573
g_propagate_error (error, _inner_error_);
576
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
577
g_clear_error (&_inner_error_);
537
586
gchar* sql_heavy_record_get_string (SQLHeavyRecord* self, const gchar* field, GError** error) {
587
g_return_val_if_fail (self != NULL, NULL);
538
588
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->get_string (self, field, error);
550
600
static gint sql_heavy_record_real_fetch_int (SQLHeavyRecord* self, gint field, GError** error) {
553
603
GValue _tmp1_ = {0};
558
606
GError * _inner_error_ = NULL;
559
sql_heavy_record_fetch_with_type (self, G_TYPE_INT, field, &_tmp0_, &_inner_error_);
608
sql_heavy_record_fetch_with_type (self, G_TYPE_INT, _tmp0_, &_tmp1_, &_inner_error_);
562
610
if (_inner_error_ != NULL) {
563
611
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
573
_tmp4_ = g_value_get_int (&_tmp3_);
575
G_IS_VALUE (&_tmp3_) ? (g_value_unset (&_tmp3_), NULL) : NULL;
620
_tmp3_ = g_value_get_int (&_tmp2_);
581
626
gint sql_heavy_record_fetch_int (SQLHeavyRecord* self, gint field, GError** error) {
627
g_return_val_if_fail (self != NULL, 0);
582
628
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->fetch_int (self, field, error);
594
640
static gint sql_heavy_record_real_get_int (SQLHeavyRecord* self, const gchar* field, GError** error) {
600
647
GError * _inner_error_ = NULL;
601
648
g_return_val_if_fail (field != NULL, 0);
602
_tmp0_ = sql_heavy_record_field_index (self, field, &_inner_error_);
604
if (_inner_error_ != NULL) {
605
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
606
g_propagate_error (error, _inner_error_);
609
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
610
g_clear_error (&_inner_error_);
614
_tmp2_ = sql_heavy_record_fetch_int (self, _tmp1_, &_inner_error_);
616
if (_inner_error_ != NULL) {
617
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
618
g_propagate_error (error, _inner_error_);
621
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
622
g_clear_error (&_inner_error_);
650
_tmp1_ = sql_heavy_record_field_index (self, _tmp0_, &_inner_error_);
652
if (_inner_error_ != NULL) {
653
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
654
g_propagate_error (error, _inner_error_);
657
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
658
g_clear_error (&_inner_error_);
662
_tmp3_ = sql_heavy_record_fetch_int (self, _tmp2_, &_inner_error_);
664
if (_inner_error_ != NULL) {
665
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
666
g_propagate_error (error, _inner_error_);
669
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
670
g_clear_error (&_inner_error_);
631
679
gint sql_heavy_record_get_int (SQLHeavyRecord* self, const gchar* field, GError** error) {
680
g_return_val_if_fail (self != NULL, 0);
632
681
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->get_int (self, field, error);
644
693
static gint64 sql_heavy_record_real_fetch_int64 (SQLHeavyRecord* self, gint field, GError** error) {
645
694
gint64 result = 0LL;
647
696
GValue _tmp1_ = {0};
652
699
GError * _inner_error_ = NULL;
653
sql_heavy_record_fetch_with_type (self, G_TYPE_INT64, field, &_tmp0_, &_inner_error_);
701
sql_heavy_record_fetch_with_type (self, G_TYPE_INT64, _tmp0_, &_tmp1_, &_inner_error_);
656
703
if (_inner_error_ != NULL) {
657
704
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
667
_tmp4_ = g_value_get_int64 (&_tmp3_);
669
G_IS_VALUE (&_tmp3_) ? (g_value_unset (&_tmp3_), NULL) : NULL;
713
_tmp3_ = g_value_get_int64 (&_tmp2_);
675
719
gint64 sql_heavy_record_fetch_int64 (SQLHeavyRecord* self, gint field, GError** error) {
720
g_return_val_if_fail (self != NULL, 0LL);
676
721
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->fetch_int64 (self, field, error);
688
733
static gint64 sql_heavy_record_real_get_int64 (SQLHeavyRecord* self, const gchar* field, GError** error) {
689
734
gint64 result = 0LL;
694
740
GError * _inner_error_ = NULL;
695
741
g_return_val_if_fail (field != NULL, 0LL);
696
_tmp0_ = sql_heavy_record_field_index (self, field, &_inner_error_);
698
if (_inner_error_ != NULL) {
699
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
700
g_propagate_error (error, _inner_error_);
703
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
704
g_clear_error (&_inner_error_);
708
_tmp2_ = sql_heavy_record_fetch_int64 (self, _tmp1_, &_inner_error_);
710
if (_inner_error_ != NULL) {
711
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
712
g_propagate_error (error, _inner_error_);
715
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
716
g_clear_error (&_inner_error_);
743
_tmp1_ = sql_heavy_record_field_index (self, _tmp0_, &_inner_error_);
745
if (_inner_error_ != NULL) {
746
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
747
g_propagate_error (error, _inner_error_);
750
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
751
g_clear_error (&_inner_error_);
755
_tmp3_ = sql_heavy_record_fetch_int64 (self, _tmp2_, &_inner_error_);
757
if (_inner_error_ != NULL) {
758
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
759
g_propagate_error (error, _inner_error_);
762
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
763
g_clear_error (&_inner_error_);
725
772
gint64 sql_heavy_record_get_int64 (SQLHeavyRecord* self, const gchar* field, GError** error) {
773
g_return_val_if_fail (self != NULL, 0LL);
726
774
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->get_int64 (self, field, error);
738
786
static gdouble sql_heavy_record_real_fetch_double (SQLHeavyRecord* self, gint field, GError** error) {
739
787
gdouble result = 0.0;
741
789
GValue _tmp1_ = {0};
791
gdouble _tmp3_ = 0.0;
746
792
GError * _inner_error_ = NULL;
747
sql_heavy_record_fetch_with_type (self, G_TYPE_DOUBLE, field, &_tmp0_, &_inner_error_);
794
sql_heavy_record_fetch_with_type (self, G_TYPE_DOUBLE, _tmp0_, &_tmp1_, &_inner_error_);
750
796
if (_inner_error_ != NULL) {
751
797
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
761
_tmp4_ = g_value_get_double (&_tmp3_);
763
G_IS_VALUE (&_tmp3_) ? (g_value_unset (&_tmp3_), NULL) : NULL;
806
_tmp3_ = g_value_get_double (&_tmp2_);
769
812
gdouble sql_heavy_record_fetch_double (SQLHeavyRecord* self, gint field, GError** error) {
813
g_return_val_if_fail (self != NULL, 0.0);
770
814
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->fetch_double (self, field, error);
782
826
static gdouble sql_heavy_record_real_get_double (SQLHeavyRecord* self, const gchar* field, GError** error) {
783
827
gdouble result = 0.0;
831
gdouble _tmp3_ = 0.0;
788
833
GError * _inner_error_ = NULL;
789
834
g_return_val_if_fail (field != NULL, 0.0);
790
_tmp0_ = sql_heavy_record_field_index (self, field, &_inner_error_);
792
if (_inner_error_ != NULL) {
793
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
794
g_propagate_error (error, _inner_error_);
797
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
798
g_clear_error (&_inner_error_);
802
_tmp2_ = sql_heavy_record_fetch_double (self, _tmp1_, &_inner_error_);
804
if (_inner_error_ != NULL) {
805
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
806
g_propagate_error (error, _inner_error_);
809
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
810
g_clear_error (&_inner_error_);
836
_tmp1_ = sql_heavy_record_field_index (self, _tmp0_, &_inner_error_);
838
if (_inner_error_ != NULL) {
839
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
840
g_propagate_error (error, _inner_error_);
843
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
844
g_clear_error (&_inner_error_);
848
_tmp3_ = sql_heavy_record_fetch_double (self, _tmp2_, &_inner_error_);
850
if (_inner_error_ != NULL) {
851
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
852
g_propagate_error (error, _inner_error_);
855
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
856
g_clear_error (&_inner_error_);
819
865
gdouble sql_heavy_record_get_double (SQLHeavyRecord* self, const gchar* field, GError** error) {
866
g_return_val_if_fail (self != NULL, 0.0);
820
867
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->get_double (self, field, error);
837
884
static guint8* sql_heavy_record_real_fetch_blob (SQLHeavyRecord* self, gint field, int* result_length1, GError** error) {
838
885
guint8* result = NULL;
840
887
GValue _tmp1_ = {0};
848
896
GError * _inner_error_ = NULL;
849
sql_heavy_record_fetch_with_type (self, G_TYPE_BYTE_ARRAY, field, &_tmp0_, &_inner_error_);
898
sql_heavy_record_fetch_with_type (self, G_TYPE_BYTE_ARRAY, _tmp0_, &_tmp1_, &_inner_error_);
852
900
if (_inner_error_ != NULL) {
853
901
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
863
_tmp4_ = g_value_get_boxed (&_tmp3_);
864
_tmp5_ = (_tmp6_ = ((GByteArray*) _tmp4_)->data, (_tmp6_ == NULL) ? ((gpointer) _tmp6_) : _vala_array_dup2 (_tmp6_, (gint) ((GByteArray*) _tmp4_)->len));
866
G_IS_VALUE (&_tmp3_) ? (g_value_unset (&_tmp3_), NULL) : NULL;
910
_tmp3_ = g_value_get_boxed (&_tmp2_);
911
_tmp4_ = ((GByteArray*) _tmp3_)->data;
912
_tmp4__length1 = (gint) ((GByteArray*) _tmp3_)->len;
913
_tmp5_ = (_tmp4_ != NULL) ? _vala_array_dup2 (_tmp4_, _tmp4__length1) : ((gpointer) _tmp4_);
914
_tmp5__length1 = _tmp4__length1;
916
_tmp6__length1 = _tmp5__length1;
868
917
if (result_length1) {
869
*result_length1 = (gint) ((GByteArray*) _tmp4_)->len;
918
*result_length1 = _tmp6__length1;
876
925
guint8* sql_heavy_record_fetch_blob (SQLHeavyRecord* self, gint field, int* result_length1, GError** error) {
926
g_return_val_if_fail (self != NULL, NULL);
877
927
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->fetch_blob (self, field, result_length1, error);
889
939
static guint8* sql_heavy_record_real_get_blob (SQLHeavyRecord* self, const gchar* field, int* result_length1, GError** error) {
890
940
guint8* result = NULL;
894
guint8* _tmp3_ = NULL;
945
guint8* _tmp4_ = NULL;
899
951
GError * _inner_error_ = NULL;
900
952
g_return_val_if_fail (field != NULL, NULL);
901
_tmp0_ = sql_heavy_record_field_index (self, field, &_inner_error_);
903
if (_inner_error_ != NULL) {
904
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
905
g_propagate_error (error, _inner_error_);
908
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
909
g_clear_error (&_inner_error_);
913
_tmp3_ = sql_heavy_record_fetch_blob (self, _tmp1_, &_tmp2_, &_inner_error_);
915
_tmp4__length1 = _tmp2_;
916
__tmp4__size_ = _tmp2_;
917
if (_inner_error_ != NULL) {
918
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
919
g_propagate_error (error, _inner_error_);
922
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
923
g_clear_error (&_inner_error_);
954
_tmp1_ = sql_heavy_record_field_index (self, _tmp0_, &_inner_error_);
956
if (_inner_error_ != NULL) {
957
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
958
g_propagate_error (error, _inner_error_);
961
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
962
g_clear_error (&_inner_error_);
966
_tmp4_ = sql_heavy_record_fetch_blob (self, _tmp2_, &_tmp3_, &_inner_error_);
968
_tmp5__length1 = _tmp3_;
969
__tmp5__size_ = _tmp5__length1;
970
if (_inner_error_ != NULL) {
971
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
972
g_propagate_error (error, _inner_error_);
975
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
976
g_clear_error (&_inner_error_);
981
_tmp6__length1 = _tmp5__length1;
928
982
if (result_length1) {
929
*result_length1 = _tmp4__length1;
983
*result_length1 = _tmp6__length1;
936
990
guint8* sql_heavy_record_get_blob (SQLHeavyRecord* self, const gchar* field, int* result_length1, GError** error) {
991
g_return_val_if_fail (self != NULL, NULL);
937
992
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->get_blob (self, field, result_length1, error);
949
1004
static time_t sql_heavy_record_real_fetch_time_t (SQLHeavyRecord* self, gint field, GError** error) {
950
1005
time_t result = 0;
952
1007
GValue _tmp1_ = {0};
1009
gint64 _tmp3_ = 0LL;
957
1010
GError * _inner_error_ = NULL;
958
sql_heavy_record_fetch_with_type (self, G_TYPE_INT64, field, &_tmp0_, &_inner_error_);
1012
sql_heavy_record_fetch_with_type (self, G_TYPE_INT64, _tmp0_, &_tmp1_, &_inner_error_);
960
1013
_tmp2_ = _tmp1_;
961
1014
if (_inner_error_ != NULL) {
962
1015
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
972
_tmp4_ = g_value_get_int64 (&_tmp3_);
973
_tmp5_ = (time_t) _tmp4_;
974
G_IS_VALUE (&_tmp3_) ? (g_value_unset (&_tmp3_), NULL) : NULL;
1024
_tmp3_ = g_value_get_int64 (&_tmp2_);
1025
result = (time_t) _tmp3_;
980
1030
time_t sql_heavy_record_fetch_time_t (SQLHeavyRecord* self, gint field, GError** error) {
1031
g_return_val_if_fail (self != NULL, 0);
981
1032
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->fetch_time_t (self, field, error);
993
1044
static time_t sql_heavy_record_real_get_time_t (SQLHeavyRecord* self, const gchar* field, GError** error) {
994
1045
time_t result = 0;
1046
const gchar* _tmp0_;
999
1051
GError * _inner_error_ = NULL;
1000
1052
g_return_val_if_fail (field != NULL, 0);
1001
_tmp0_ = sql_heavy_record_field_index (self, field, &_inner_error_);
1003
if (_inner_error_ != NULL) {
1004
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
1005
g_propagate_error (error, _inner_error_);
1008
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1009
g_clear_error (&_inner_error_);
1013
_tmp2_ = sql_heavy_record_fetch_time_t (self, _tmp1_, &_inner_error_);
1015
if (_inner_error_ != NULL) {
1016
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
1017
g_propagate_error (error, _inner_error_);
1020
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1021
g_clear_error (&_inner_error_);
1054
_tmp1_ = sql_heavy_record_field_index (self, _tmp0_, &_inner_error_);
1056
if (_inner_error_ != NULL) {
1057
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
1058
g_propagate_error (error, _inner_error_);
1061
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1062
g_clear_error (&_inner_error_);
1066
_tmp3_ = sql_heavy_record_fetch_time_t (self, _tmp2_, &_inner_error_);
1068
if (_inner_error_ != NULL) {
1069
if (_inner_error_->domain == SQL_HEAVY_ERROR) {
1070
g_propagate_error (error, _inner_error_);
1073
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1074
g_clear_error (&_inner_error_);
1030
1083
time_t sql_heavy_record_get_time_t (SQLHeavyRecord* self, const gchar* field, GError** error) {
1084
g_return_val_if_fail (self != NULL, 0);
1031
1085
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->get_time_t (self, field, error);
1035
1089
gint sql_heavy_record_get_field_count (SQLHeavyRecord* self) {
1090
g_return_val_if_fail (self != NULL, 0);
1036
1091
return SQL_HEAVY_RECORD_GET_INTERFACE (self)->get_field_count (self);