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; } };