mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
SqlSelect::AsValue, SqlId::Of(const char *)
git-svn-id: svn://ultimatepp.org/upp/trunk@786 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
999e10e2a7
commit
435c8e13c4
2 changed files with 7 additions and 0 deletions
|
|
@ -7,6 +7,11 @@ SqlCol SqlCol::As(const char *as) const
|
|||
return name + SqlCase(MSSQL | PGSQL, " as ")(" ") + as;
|
||||
}
|
||||
|
||||
SqlCol SqlId::Of(const char *of) const
|
||||
{
|
||||
return of + ('.' + ToString());
|
||||
}
|
||||
|
||||
SqlCol SqlId::Of(SqlId id) const
|
||||
{
|
||||
return id.IsNull() ? ToString() : id.ToString() + '.' + ToString();
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ public:
|
|||
String operator~() const { return ToString(); }
|
||||
|
||||
SqlCol Of(SqlId id) const;
|
||||
SqlCol Of(const char *of) const;
|
||||
SqlId As(const char *as) const;
|
||||
SqlId As(SqlId id) const { return As(~~id); }
|
||||
SqlId operator[](int i) const;
|
||||
|
|
@ -483,6 +484,7 @@ public:
|
|||
|
||||
operator SqlSet() const { return SqlSet(text, SqlSet::SETOP); }
|
||||
operator SqlStatement() const { return SqlStatement(text); }
|
||||
SqlVal AsValue() const { return SqlVal(text, SqlVal::LOW); }
|
||||
|
||||
SqlSelect(Fields f);
|
||||
SqlSelect(const SqlSet& s) { text = ~s; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue