mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:43:04 +01:00
Boolean datatype in gpre C++ module
This commit is contained in:
parent
bd35281a05
commit
926e226f92
@ -416,6 +416,11 @@ static int print_blr_dtype(ctl* control, bool print_object)
|
||||
length = 8;
|
||||
break;
|
||||
|
||||
case blr_bool:
|
||||
string = "bool";
|
||||
length = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
error(control, 0, "*** invalid data type ***", 0);
|
||||
}
|
||||
|
@ -410,6 +410,11 @@ USHORT MET_get_dtype(USHORT blr_dtype, USHORT sub_type, USHORT* length)
|
||||
l = sizeof(ISC_INT64);
|
||||
break;
|
||||
|
||||
case blr_bool:
|
||||
dtype = dtype_boolean;
|
||||
l = sizeof(UCHAR);
|
||||
break;
|
||||
|
||||
default:
|
||||
CPR_error("datatype not supported");
|
||||
return 0; // silence non initialized warning
|
||||
|
@ -3594,6 +3594,10 @@ static void make_array_declaration(ref* reference)
|
||||
dtype = "double";
|
||||
break;
|
||||
|
||||
case dtype_boolean:
|
||||
dtype = "UCHAR";
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
TEXT s[ERROR_LENGTH];
|
||||
@ -3754,6 +3758,10 @@ static void make_port(const gpre_port* port, int column)
|
||||
dtype = "double";
|
||||
break;
|
||||
|
||||
case dtype_boolean:
|
||||
dtype = "UCHAR";
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
TEXT s[ERROR_LENGTH];
|
||||
|
@ -1867,6 +1867,9 @@ static void cmp_sdl_dtype( const gpre_fld* field, ref* reference)
|
||||
else
|
||||
reference->add_byte(blr_double);
|
||||
break;
|
||||
case dtype_boolean:
|
||||
reference->add_byte(blr_bool);
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
|
@ -848,6 +848,9 @@ static void cmp_field( gpre_req* request, const gpre_fld* field,
|
||||
else
|
||||
request->add_byte(blr_double);
|
||||
break;
|
||||
case dtype_boolean:
|
||||
request->add_byte(blr_bool);
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
|
@ -700,6 +700,10 @@ static void make_port( const gpre_port* port, int column)
|
||||
fmtstr = " double jrd_%d;\t// %s ";
|
||||
break;
|
||||
|
||||
case dtype_boolean:
|
||||
fmtstr = " UCHAR jrd_%d;\t// %s ";
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
TEXT s[ERROR_LENGTH];
|
||||
|
@ -3583,6 +3583,10 @@ static void make_array_declaration(ref* reference)
|
||||
dtype = "double";
|
||||
break;
|
||||
|
||||
case dtype_boolean:
|
||||
dtype = "UCHAR";
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
TEXT s[ERROR_LENGTH];
|
||||
@ -3743,6 +3747,10 @@ static void make_port(const gpre_port* port, int column)
|
||||
dtype = "double";
|
||||
break;
|
||||
|
||||
case dtype_boolean:
|
||||
dtype = "UCHAR";
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
TEXT s[ERROR_LENGTH];
|
||||
|
@ -956,6 +956,11 @@ USHORT MET_get_dtype(USHORT blr_dtype, USHORT sub_type, USHORT char_length, USHO
|
||||
l = sizeof(ISC_INT64);
|
||||
break;
|
||||
|
||||
case blr_bool:
|
||||
dtype = dtype_boolean;
|
||||
l = sizeof(UCHAR);
|
||||
break;
|
||||
|
||||
default:
|
||||
CPR_error("datatype not supported");
|
||||
return 0; // silence non initialized warning
|
||||
|
Loading…
Reference in New Issue
Block a user