代码拉取完成,页面将自动刷新
同步操作将从 openGauss/openGauss-connector-odbc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*-------
* Module: tuple.c
*
* Description: This module contains functions for setting the data
* for individual fields (TupleField structure) of a
* manual result set.
*
* Important Note: These functions are ONLY used in building manual
* result sets for info functions (SQLTables,
* SQLColumns, etc.)
*
* Classes: n/a
*
* API functions: none
*
* Comments: See "readme.txt" for copyright and license information.
*-------
*/
#include "tuple.h"
#include "misc.h"
#include <string.h>
#include <stdlib.h>
void
set_tuplefield_null(TupleField *tuple_field)
{
tuple_field->len = 0;
tuple_field->value = NULL; /* strdup(""); */
}
void
set_tuplefield_string(TupleField *tuple_field, const char *string)
{
if (string)
{
tuple_field->len = (Int4) strlen(string); /* PG restriction */
tuple_field->value = strdup(string);
}
if (!tuple_field->value)
set_tuplefield_null(tuple_field);
}
void
set_tuplefield_int2(TupleField *tuple_field, Int2 value)
{
char buffer[10];
ITOA_FIXED(buffer, value);
tuple_field->len = (Int4) (strlen(buffer) + 1);
/* +1 ... is this correct (better be on the save side-...) */
tuple_field->value = strdup(buffer);
}
void
set_tuplefield_int4(TupleField *tuple_field, Int4 value)
{
char buffer[15];
ITOA_FIXED(buffer, value);
tuple_field->len = (Int4) (strlen(buffer) + 1);
/* +1 ... is this correct (better be on the save side-...) */
tuple_field->value = strdup(buffer);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。