[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: Sat, 30 Jan 2021 22:18:51 +0000 (UTC)
commit e14eed06e38d7f36b77760ae90976934a8380f3f
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 d84c9682a..7b3bf5e2d 100644
--- a/tests/providers/prov-test-common.c
+++ b/tests/providers/prov-test-common.c
@@ -1063,7 +1063,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 ++;
@@ -1224,7 +1224,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]