[libgda] test: Using standard method to get a value as a string
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] test: Using standard method to get a value as a string
- Date: Sun, 31 Jan 2021 01:45:23 +0000 (UTC)
commit 36d5fd6541df272eb8b56410c334f83a4558c446
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Thu Jun 18 23:24:24 2020 -0500
test: Using standard method to get a value as a string
tests/providers/prov-test-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/providers/prov-test-common.c b/tests/providers/prov-test-common.c
index cc47e4345..35f0db09a 100644
--- a/tests/providers/prov-test-common.c
+++ b/tests/providers/prov-test-common.c
@@ -1064,7 +1064,7 @@ prov_test_common_check_timestamp (void)
str = gda_data_handler_get_str_from_value (dh, cvalue);
g_object_unref (model);
- stmt = gda_sql_parser_parse_string (parser, "SELECT ts || 'asstring' FROM tstest", NULL, &error); /*
retreive timestamp as string */
+ stmt = gda_sql_parser_parse_string (parser, "SELECT CAST(ts AS TEXT) FROM tstest", NULL, &error); /*
retreive timestamp as string */
if (!stmt) {
g_free (str);
number_failed ++;
@@ -1225,7 +1225,7 @@ prov_test_common_check_date (void)
str = gda_data_handler_get_str_from_value (dh, cvalue);
g_object_unref (model);
- stmt = gda_sql_parser_parse_string (parser, "SELECT thedate || 'asstring' FROM datetest", NULL,
&error); /* retreive date as string */
+ stmt = gda_sql_parser_parse_string (parser, "SELECT CAST(thedate AS TEXT) FROM datetest", NULL,
&error); /* retreive date as string */
if (!stmt) {
g_free (str);
number_failed ++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]