8
0
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:
aafemt 2016-03-03 11:44:55 +00:00 committed by Roman Simakov
parent bd35281a05
commit 926e226f92
8 changed files with 41 additions and 0 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -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];

View File

@ -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:
{

View File

@ -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:
{

View File

@ -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];

View File

@ -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];

View File

@ -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