438
448
drizzle_result_st *drizzle_column_drizzle_result(drizzle_column_st *column)
440
455
return column->result;
443
458
const char *drizzle_column_catalog(drizzle_column_st *column)
445
465
return column->catalog;
448
468
const char *drizzle_column_db(drizzle_column_st *column)
450
475
return column->db;
453
478
const char *drizzle_column_table(drizzle_column_st *column)
455
485
return column->table;
458
488
const char *drizzle_column_orig_table(drizzle_column_st *column)
460
495
return column->orig_table;
463
498
const char *drizzle_column_name(drizzle_column_st *column)
465
505
return column->name;
468
508
const char *drizzle_column_orig_name(drizzle_column_st *column)
470
515
return column->orig_name;
473
518
drizzle_charset_t drizzle_column_charset(drizzle_column_st *column)
522
return drizzle_charset_t();
475
525
return column->charset;
478
528
uint32_t drizzle_column_size(drizzle_column_st *column)
480
535
return column->size;
483
538
size_t drizzle_column_max_size(drizzle_column_st *column)
485
545
return column->max_size;
488
548
void drizzle_column_set_max_size(drizzle_column_st *column, size_t size)
490
555
column->max_size= size;
493
558
drizzle_column_type_t drizzle_column_type(drizzle_column_st *column)
562
return drizzle_column_type_t();
495
565
return column->type;
498
568
drizzle_column_type_drizzle_t
499
569
drizzle_column_type_drizzle(drizzle_column_st *column)
573
return drizzle_column_type_drizzle_t();
501
576
return _column_type_drizzle_map_from[column->type];
504
579
drizzle_column_flags_t drizzle_column_flags(drizzle_column_st *column)
583
return drizzle_column_flags_t();
506
586
return drizzle_column_flags_t(column->flags);
509
589
uint8_t drizzle_column_decimals(drizzle_column_st *column)
511
596
return column->decimals;
514
599
const uint8_t *drizzle_column_default_value(drizzle_column_st *column,
517
607
*size= column->default_value_size;
518
608
return column->default_value;
540
635
drizzle_return_t drizzle_column_skip_all(drizzle_result_st *result)
639
return DRIZZLE_RETURN_INVALID_ARGUMENT;
542
642
for (uint16_t it= 1; it <= result->column_count; it++)
544
644
drizzle_return_t ret= drizzle_column_skip(result);
556
656
drizzle_column_st *column,
557
657
drizzle_return_t *ret_ptr)
659
drizzle_return_t unused_ret;
662
ret_ptr= &unused_ret;
559
670
if (drizzle_state_none(result->con))
561
672
result->column= column;
656
797
drizzle_return_t drizzle_column_write(drizzle_result_st *result,
657
798
drizzle_column_st *column)
802
return DRIZZLE_RETURN_INVALID_ARGUMENT;
659
805
if (drizzle_state_none(result->con))
661
807
result->column= column;
747
918
void drizzle_column_set_charset(drizzle_column_st *column,
748
919
drizzle_charset_t charset)
750
926
column->charset= charset;
753
929
void drizzle_column_set_size(drizzle_column_st *column, uint32_t size)
755
936
column->size= size;
758
939
void drizzle_column_set_type(drizzle_column_st *column,
759
940
drizzle_column_type_t type)
761
947
column->type= type;
764
950
void drizzle_column_set_flags(drizzle_column_st *column,
765
951
drizzle_column_flags_t flags)
767
958
column->flags= flags;
770
961
void drizzle_column_set_decimals(drizzle_column_st *column, uint8_t decimals)
772
968
column->decimals= decimals;
776
972
const uint8_t *default_value,
779
980
if (default_value == NULL)
780
982
column->default_value[0]= 0;
783
986
if (size < DRIZZLE_MAX_DEFAULT_VALUE_SIZE)
906
1114
drizzle_return_t drizzle_state_column_write(drizzle_con_st *con)
1118
return DRIZZLE_RETURN_INVALID_ARGUMENT;
908
1121
uint8_t *start= con->buffer_ptr + con->buffer_size;
910
1123
drizzle_column_st *column= con->result->column;