本文整理汇总了C++中Split::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ Split::push_back方法的具体用法?C++ Split::push_back怎么用?C++ Split::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Split
的用法示例。
在下文中一共展示了Split::push_back方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: link
void ActivityInTTS::link(const litesql::Database& db, const pomotuxdatabase::Activity& o0, const pomotuxdatabase::TodoTodaySheet& o1)
{
Record values;
Split fields;
fields.push_back(Activity.name());
values.push_back(o0.id);
fields.push_back(TodoTodaySheet.name());
values.push_back(o1.id);
db.insert(table__, values, fields);
}
示例2: selectObjectQuery
SelectQuery selectObjectQuery(const std::vector<FieldType>& fdatas,
const Expr& e) {
SelectQuery sel;
Split tables;
std::set<LITESQL_String> tableSet;
for (size_t i = 0; i < fdatas.size(); i++)
if (tableSet.find(fdatas[i].table()) == tableSet.end()) {
tables.push_back(fdatas[i].table());
tableSet.insert(fdatas[i].table());
}
Split tableFilters;
tableFilters.resize(tables.size()-1);
for (size_t i = 1; i < tables.size(); i++)
tableFilters[i-1] = tables[i-1] + LITESQL_L(".id_ = ") + tables[i] + LITESQL_L(".id_");
tableSet.clear();
for (size_t i = 0; i < tables.size(); i++) {
sel.source(tables[i]);
tableSet.insert(tables[i]);
}
if (tables.size() > 1)
sel.where((e && RawExpr(tableFilters.join(LITESQL_L(" AND ")))).asString());
else
sel.where(e.asString());
for (size_t i = 0; i < fdatas.size(); i++)
sel.result(fdatas[i].table() + LITESQL_L(".") + fdatas[i].name());
return sel;
}
示例3: LITESQL_String
UpdateQuery::operator LITESQL_String() const {
LITESQL_String q = LITESQL_L("UPDATE ") + table + LITESQL_L(" SET ");
Split sets;
for (size_t i = 0; i < fields.size(); i++)
sets.push_back(fields[i] + LITESQL_L("=") + values[i]);
q += sets.join(LITESQL_L(","));
if (_where.size())
q += LITESQL_L(" WHERE ") + _where;
return q;
}
示例4: getSQLType
string OCILib::getSQLType(AT_field_type fieldType, const string& length) const
{
Split s;
switch(fieldType) {
case A_field_type_integer: return "INTEGER";
case A_field_type_bigint: return "BIGINT";
case A_field_type_string:
s.push_back("VARCHAR(");
(length.size()>0)?(s.push_back(length)):(s.push_back("4000"));
s.push_back(")");
return s.join("");
case A_field_type_float: return "BINARY_FLOAT";
case A_field_type_double: return "BINARY_DOUBLE";
case A_field_type_boolean: return "INTEGER";
case A_field_type_date: return "INTEGER";
case A_field_type_time: return "INTEGER";
case A_field_type_datetime: return "INTEGER";
case A_field_type_blob: return "BLOB";
default: return "";
}
}