mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-07 22:03:42 -06:00
SqlId::operator[](SqlId) as alternative to .Of
git-svn-id: svn://ultimatepp.org/upp/trunk@584 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
149f1afc77
commit
9487ebbf52
2 changed files with 7 additions and 1 deletions
|
|
@ -12,6 +12,11 @@ SqlCol SqlId::Of(SqlId id) const
|
|||
return id.IsNull() ? ToString() : id.ToString() + '.' + ToString();
|
||||
}
|
||||
|
||||
SqlId SqlId::operator[](const SqlId& id) const
|
||||
{
|
||||
return id.IsNull() ? ToString() : ToString() + '.' + id.ToString();
|
||||
}
|
||||
|
||||
SqlId SqlId::As(const char *as) const
|
||||
{
|
||||
return id.IsNull() ? ToString() : ToString() + SqlCase(MSSQL | PGSQL, " as ")(" ") + as;
|
||||
|
|
|
|||
|
|
@ -106,8 +106,9 @@ public:
|
|||
SqlCol Of(SqlId id) const;
|
||||
SqlId As(const char *as) const;
|
||||
SqlId As(SqlId id) const { return As(~~id); }
|
||||
SqlId operator [] (int i) const;
|
||||
SqlId operator[](int i) const;
|
||||
SqlId operator&(const SqlId& s) const;
|
||||
SqlId operator[](const SqlId& id) const;
|
||||
|
||||
SqlId() {}
|
||||
SqlId(const char *s) : id(s) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue