aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/tuple.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/odbc/tuple.c')
-rw-r--r--src/interfaces/odbc/tuple.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/interfaces/odbc/tuple.c b/src/interfaces/odbc/tuple.c
index e12f2fc55e9..658b7a75ec7 100644
--- a/src/interfaces/odbc/tuple.c
+++ b/src/interfaces/odbc/tuple.c
@@ -1,23 +1,27 @@
-/* Module: tuple.c
+/*-------
+ * Module: tuple.c
*
- * Description: This module contains functions for setting the data for individual
- * fields (TupleField structure) of a manual result set.
+ * 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.)
+ * 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 "notice.txt" for copyright and license information.
- *
+ *-------
*/
#include "tuple.h"
#include <string.h>
#include <stdlib.h>
+
void
set_tuplefield_null(TupleField *tuple_field)
{
@@ -25,6 +29,7 @@ set_tuplefield_null(TupleField *tuple_field)
tuple_field->value = NULL; /* strdup(""); */
}
+
void
set_tuplefield_string(TupleField *tuple_field, char *string)
{
@@ -39,7 +44,6 @@ set_tuplefield_int2(TupleField *tuple_field, Int2 value)
{
char buffer[10];
-
sprintf(buffer, "%d", value);
tuple_field->len = strlen(buffer) + 1;
@@ -47,6 +51,7 @@ set_tuplefield_int2(TupleField *tuple_field, Int2 value)
tuple_field->value = strdup(buffer);
}
+
void
set_tuplefield_int4(TupleField *tuple_field, Int4 value)
{