From 7b4240e4f4e303d6cabaa89d553a6b3492b42188 Mon Sep 17 00:00:00 2001 From: Serge Robyns Date: Sun, 19 Mar 2017 16:21:14 +0100 Subject: [PATCH] intermediate fix for issue 152 --- include/sqlpp11/alias.h | 2 +- include/sqlpp11/column.h | 2 +- include/sqlpp11/cte.h | 4 ++-- include/sqlpp11/simple_column.h | 2 +- include/sqlpp11/table.h | 2 +- include/sqlpp11/table_alias.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/sqlpp11/alias.h b/include/sqlpp11/alias.h index 0a041a9e..a6f8ddcb 100644 --- a/include/sqlpp11/alias.h +++ b/include/sqlpp11/alias.h @@ -66,7 +66,7 @@ namespace sqlpp { serialize_operand(t._expression, context); context << " AS "; - context << name_of::char_ptr(); + context << '"' << name_of::char_ptr() << '"'; return context; } }; diff --git a/include/sqlpp11/column.h b/include/sqlpp11/column.h index fe22efc4..3227cadd 100644 --- a/include/sqlpp11/column.h +++ b/include/sqlpp11/column.h @@ -125,7 +125,7 @@ namespace sqlpp static Context& _(const T&, Context& context) { - context << name_of::char_ptr() << '.' << name_of::char_ptr(); + context << '"' << name_of::char_ptr() << '"' << '.' << '"' << name_of::char_ptr() << '"'; return context; } }; diff --git a/include/sqlpp11/cte.h b/include/sqlpp11/cte.h index cc7a8827..3c54aded 100644 --- a/include/sqlpp11/cte.h +++ b/include/sqlpp11/cte.h @@ -235,7 +235,7 @@ namespace sqlpp static Context& _(const T& t, Context& context) { - context << name_of::char_ptr() << " AS ("; + context << '"' << name_of::char_ptr() << '"' << " AS ("; serialize(t._statement, context); context << ")"; return context; @@ -279,7 +279,7 @@ namespace sqlpp static Context& _(const T&, Context& context) { - context << name_of::char_ptr(); + context << '"' << name_of::char_ptr() << '"'; return context; } }; diff --git a/include/sqlpp11/simple_column.h b/include/sqlpp11/simple_column.h index 33cfdd6a..d3bae9fa 100644 --- a/include/sqlpp11/simple_column.h +++ b/include/sqlpp11/simple_column.h @@ -56,7 +56,7 @@ namespace sqlpp static Context& _(const T&, Context& context) { - context << name_of::char_ptr(); + context << '"' << name_of::char_ptr() << '"'; return context; } }; diff --git a/include/sqlpp11/table.h b/include/sqlpp11/table.h index 7e51f22d..84cd9139 100644 --- a/include/sqlpp11/table.h +++ b/include/sqlpp11/table.h @@ -120,7 +120,7 @@ namespace sqlpp static Context& _(const T&, Context& context) { - context << name_of::char_ptr(); + context << '"' << name_of::char_ptr() << '"'; return context; } }; diff --git a/include/sqlpp11/table_alias.h b/include/sqlpp11/table_alias.h index ae534463..e7e259fb 100644 --- a/include/sqlpp11/table_alias.h +++ b/include/sqlpp11/table_alias.h @@ -112,7 +112,7 @@ namespace sqlpp serialize(t._table, context); if (requires_braces_t::value) context << ")"; - context << " AS " << name_of::char_ptr(); + context << " AS " << '"' << name_of::char_ptr() << '"'; return context; } };