本文整理汇总了C++中GetQuotedFullIdentifier函数的典型用法代码示例。如果您正苦于以下问题:C++ GetQuotedFullIdentifier函数的具体用法?C++ GetQuotedFullIdentifier怎么用?C++ GetQuotedFullIdentifier使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetQuotedFullIdentifier函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: qtIdent
wxString pgSchemaBase::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
wxString strName = qtIdent(GetName());
if (GetMetaType() == PGM_CATALOG)
sql = wxT("-- Catalog: ") + GetName() + wxT("\n\n");
else
sql = wxT("-- Schema: ") + GetName() + wxT("\n\n");
sql += wxT("-- DROP SCHEMA ") + GetQuotedFullIdentifier() + wxT(";")
+ wxT("\n\nCREATE SCHEMA ") + strName
+ wxT("\n AUTHORIZATION ") + qtIdent(GetOwner());
sql += wxT(";\n\n");
sql += GetGrant(wxT("UC"), wxT("SCHEMA ") + GetQuotedFullIdentifier())
+ GetCommentSql();
sql += wxT("\n") + pgDatabase::GetDefaultPrivileges('r', m_defPrivsOnTables, strName);
sql += pgDatabase::GetDefaultPrivileges('S', m_defPrivsOnSeqs, strName);
sql += pgDatabase::GetDefaultPrivileges('f', m_defPrivsOnFuncs, strName);
if (GetConnection()->BackendMinimumVersion(9, 1))
sql += GetSeqLabelsSql();
}
return sql;
}
示例2: wxT
wxString pgOperator::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Operator: ") + GetQuotedFullIdentifier() + wxT("(") + GetOperands() + wxT(")\n\n")
+ wxT("-- DROP OPERATOR ") + GetQuotedFullIdentifier()
+ wxT("(") + GetOperands() + wxT(");\n\n")
wxT("CREATE OPERATOR ") + GetQuotedFullIdentifier()
+ wxT("(\n PROCEDURE = ") + GetOperatorFunction();
AppendIfFilled(sql, wxT(",\n LEFTARG = "), qtTypeIdent(GetLeftType()));
AppendIfFilled(sql, wxT(",\n RIGHTARG = "), qtTypeIdent(GetRightType()));
AppendIfFilled(sql, wxT(",\n COMMUTATOR = "), GetCommutator());
AppendIfFilled(sql, wxT(",\n RESTRICT = "), GetRestrictFunction());
AppendIfFilled(sql, wxT(",\n JOIN = "), GetJoinFunction());
if (GetHashJoins()) sql += wxT(",\n HASHES");
if (GetMergeJoins()) sql += wxT(",\n MERGES");
if (!GetDatabase()->BackendMinimumVersion(8, 3))
{
AppendIfFilled(sql, wxT(",\n SORT1 = "), GetLeftSortOperator());
AppendIfFilled(sql, wxT(",\n SORT2 = "), GetRightSortOperator());
AppendIfFilled(sql, wxT(",\n LTCMP = "), GetLessOperator());
AppendIfFilled(sql, wxT(",\n GTCMP = "), GetGreaterOperator());
}
sql += wxT(");\n");
if (!GetComment().IsNull())
sql += wxT("COMMENT ON OPERATOR ") + GetQuotedFullIdentifier()
+ wxT("(") + GetOperands() + wxT(") IS ")
+ qtDbString(GetComment()) + wxT(";\n");
}
return sql;
}
示例3: wxT
wxString pgLanguage::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Language: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- DROP LANGUAGE ") + GetQuotedFullIdentifier() + wxT(";")
+ wxT("\n\nCREATE ");
if (GetTrusted())
sql += wxT("TRUSTED ");
sql += wxT("PROCEDURAL LANGUAGE '") + GetName()
+ wxT("'\n HANDLER ") + qtIdent(GetHandlerProc());
if (!GetInlineProc().IsEmpty())
sql += wxT("\n INLINE ") + qtIdent(GetInlineProc());
if (!GetValidatorProc().IsEmpty())
sql += wxT("\n VALIDATOR ") + qtIdent(GetValidatorProc());
sql += wxT(";\n")
+ GetOwnerSql(8, 3, wxT("LANGUAGE ") + GetName())
+ GetGrant(wxT("U"), wxT("LANGUAGE ") + GetQuotedFullIdentifier());
if (GetConnection()->BackendMinimumVersion(9, 1))
sql += GetSeqLabelsSql();
}
return sql;
}
示例4: wxT
wxString pgType::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Type: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- DROP TYPE ") + GetQuotedFullIdentifier() + wxT(";")
+ wxT("\n\nCREATE TYPE ") + GetQuotedFullIdentifier();
if (GetTypeClass() == TYPE_COMPOSITE)
{
sql += wxT(" AS\n (");
sql += GetQuotedTypesList();
}
else if (GetTypeClass() == TYPE_ENUM)
{
sql += wxT(" AS ENUM\n (");
sql += GetQuotedLabelList();
}
else
{
sql += wxT("\n (INPUT=") + qtIdent(GetInputFunction())
+ wxT(", OUTPUT=") + qtIdent(GetOutputFunction());
AppendIfFilled(sql, wxT(", DEFAULT="), qtDbString(GetDefault()));
if (!GetElement().IsNull())
{
sql += wxT(",\n ELEMENT=") + GetElement()
+ wxT(", DELIMITER='") + GetDelimiter() + wxT("'");
}
sql += wxT(",\n INTERNALLENGTH=") + NumToStr(GetInternalLength())
+ wxT(", ALIGNMENT=" + GetAlignment()
+ wxT(", STORAGE=") + GetStorage());
if (GetConnection()->BackendMinimumVersion(8, 3))
{
if (GetTypmodinFunction() != wxEmptyString && GetTypmodoutFunction() != wxEmptyString)
{
sql += wxT(",\n TYPMOD_IN=") + GetTypmodinFunction()
+ wxT(", TYPMOD_OUT=") + GetTypmodoutFunction();
}
else if (GetTypmodinFunction() != wxEmptyString)
sql += wxT(",\n TYPMOD_IN=") + GetTypmodinFunction();
else if (GetTypmodoutFunction() != wxEmptyString)
sql += wxT(",\n TYPMOD_OUT=") + GetTypmodoutFunction();
}
if (GetConnection()->BackendMinimumVersion(9, 1) && GetCollatable())
{
sql += wxT(",\n COLLATABLE=true");
}
}
sql += wxT(");\n")
+ GetOwnerSql(8, 0)
+ GetCommentSql();
if (GetConnection()->BackendMinimumVersion(9, 1))
sql += GetSeqLabelsSql();
}
return sql;
}
示例5: wxT
wxString pgDomain::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Domain: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- DROP DOMAIN ") + GetQuotedFullIdentifier() + wxT(";")
+ wxT("\n\nCREATE DOMAIN ") + GetQuotedFullIdentifier()
+ wxT("\n AS ") + GetQuotedBasetype();
if (GetCollationOid() > 0)
sql += wxT("\n COLLATE ") + GetQuotedCollation();
AppendIfFilled(sql, wxT("\n DEFAULT "), GetDefault());
// CONSTRAINT Name Dont know where it's stored, may be omitted anyway
if (notNull)
sql += wxT("\n NOT NULL");
// Get a count of the constraints.
int consCount = 0;
pgCollection *constraints = browser->FindCollection(checkFactory, GetId());
if (constraints)
{
constraints->ShowTreeDetail(browser);
treeObjectIterator consIt(browser, constraints);
pgObject *data;
while ((data = consIt.GetNextObject()) != 0)
{
data->ShowTreeDetail(browser);
sql += wxT("\n CONSTRAINT ") + data->GetQuotedIdentifier()
+ wxT(" ") + data->GetTypeName().Upper()
+ wxT(" ") ;
switch (data->GetMetaType())
{
case PGM_CHECK:
sql += wxT("(") + ((pgCheck *)data)->GetDefinition() + wxT(")");
if (GetDatabase()->BackendMinimumVersion(9, 2) && !((pgCheck *)data)->GetValid())
sql += wxT(" NOT VALID");
break;
}
}
}
sql += wxT(";\n")
+ GetOwnerSql(7, 4)
+ GetCommentSql();
if (GetConnection()->BackendMinimumVersion(9, 1))
sql += GetSeqLabelsSql();
}
return sql;
}
示例6: wxT
wxString pgOperatorFamily::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Operator Family: ") + GetName() + wxT("\n\n")
+ wxT("-- DROP OPERATOR FAMILY ") + GetQuotedFullIdentifier() + wxT(" USING ") + GetAccessMethod() + wxT(";")
+ wxT("\n\nCREATE OPERATOR FAMILY ") + GetQuotedFullIdentifier()
+ wxT(" USING ") + GetAccessMethod()
+ wxT(";");
}
return sql;
}
示例7: rdo
void pgRole::ReassignDropOwnedTo(frmMain *form)
{
wxString query;
dlgReassignDropOwned rdo(form, GetConnection(), this, GetServer()->GetDbRestriction());
if (rdo.ShowModal() != wxID_CANCEL)
{
pgConn *conn;
conn = new pgConn(GetConnection()->GetHost(),
GetConnection()->GetService(),
GetConnection()->GetHostAddr(),
rdo.GetDatabase(),
GetConnection()->GetUser(),
GetConnection()->GetPassword(),
GetConnection()->GetPort(),
GetConnection()->GetRole(),
GetConnection()->GetSslMode(),
0,
GetConnection()->GetApplicationName(),
GetConnection()->GetSSLCert(),
GetConnection()->GetSSLKey(),
GetConnection()->GetSSLRootCert(),
GetConnection()->GetSSLCrl(),
GetConnection()->GetSSLCompression());
if (conn->GetStatus() == PGCONN_OK)
{
if (rdo.IsReassign())
{
if (wxMessageBox(_("Are you sure you wish to reassign all objects owned by the selected role?"), _("Reassign objects"), wxYES_NO) != wxYES)
return;
query = wxT("REASSIGN OWNED BY ") + GetQuotedFullIdentifier() + wxT(" TO ") + qtIdent(rdo.GetRole());
}
else
{
if (wxMessageBox(_("Are you sure you wish to drop all objects owned by the selected role?"), _("Drop objects"), wxYES_NO) != wxYES)
return;
query = wxT("DROP OWNED BY ") + GetQuotedFullIdentifier();
}
conn->ExecuteVoid(query);
}
else
{
wxMessageBox(wxT("Connection failed: ") + conn->GetLastError());
}
}
}
示例8: wxT
wxString gpResQueue::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Resource Queue: \"") + GetName() + wxT("\"\n\n")
+ wxT("-- DROP RESOURCE QUEUE ") + GetQuotedFullIdentifier() + wxT(";")
+ wxT("\n\nCREATE RESOURCE QUEUE ") + GetQuotedIdentifier();
if (GetCountLimit() != -1.0)
{
sql += wxT(" ACTIVE THRESHOLD ");
sql += NumToStr(GetCountLimit());
}
if (GetCostLimit() != -1.0)
{
sql += wxT(" COST THRESHOLD ");
sql += NumToStr(GetCostLimit());
}
if (GetIgnoreCostLimit() != 0.0)
{
sql += wxT(" IGNORE THRESHOLD ");
sql += NumToStr(GetIgnoreCostLimit());
}
if (GetOvercommit())
sql += wxT(" OVERCOMMIT");
else
sql += wxT(" NOOVERCOMMIT");
}
return sql;
}
示例9: wxT
bool pgForeignServer::DropObject(wxFrame *frame, ctlTree *browser, bool cascaded)
{
wxString sql = wxT("DROP SERVER ") + GetQuotedFullIdentifier();
if (cascaded)
sql += wxT(" CASCADE");
return GetDatabase()->ExecuteVoid(sql);
}
示例10: wxT
wxString pgTablespace::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Tablespace: ") + GetName() + wxT("\n\n");
if (location.IsEmpty())
sql += wxT("-- System Tablespace\n");
else
sql += wxT("-- DROP TABLESPACE ") + GetQuotedIdentifier()
+ wxT("\n\nCREATE TABLESPACE ") + GetQuotedIdentifier()
+ wxT("\n OWNER ") + qtIdent(GetOwner())
+ wxT("\n LOCATION ") + qtDbString(location)
+ wxT(";\n");
sql += GetCommentSql();
size_t i;
for (i = 0 ; i < variables.GetCount() ; i++)
sql += wxT("ALTER TABLESPACE ") + GetQuotedFullIdentifier()
+ wxT(" SET (") + variables.Item(i) + wxT(");\n");
if (GetConnection()->BackendMinimumVersion(9, 2))
sql += GetSeqLabelsSql();
}
return sql;
}
示例11: GetQuotedFullIdentifier
wxString edbPackage::GetSql(ctlTree *browser)
{
wxString qtName = GetQuotedFullIdentifier();
if (sql.IsNull())
{
sql = wxT("-- Package: ") + qtName + wxT("\n\n")
wxT("-- DROP PACKAGE ") + qtName;
sql += wxT(";\n\n");
sql += wxT("CREATE OR REPLACE PACKAGE ") + qtName + wxT("\nIS\n");
sql += GetHeaderInner();
sql += wxT("\nEND ") + qtIdent(GetName()) + wxT(";\n\n");
if (!GetBodyInner().Trim().IsEmpty())
{
sql += wxT("CREATE OR REPLACE PACKAGE BODY ") + qtName + wxT("\nIS\n");
sql += GetBodyInner();
sql += wxT("\nEND ") + qtIdent(GetName()) + wxT(";\n\n");
}
sql += GetGrant(wxT("X"), wxT("PACKAGE ") + qtName);
sql += wxT("\n");
}
return sql;
}
示例12: wxT
wxString pgView::GetSelectSql(ctlTree *browser)
{
wxString qms;
wxString sql =
wxT("SELECT ") + GetCols(browser, 7, qms, false) + wxT("\n")
wxT(" FROM ") + GetQuotedFullIdentifier() + wxT(";\n");
return sql;
}
示例13: wxT
wxString pgView::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- View: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- DROP VIEW ") + GetQuotedFullIdentifier() + wxT(";")
+ wxT("\n\nCREATE OR REPLACE VIEW ") + GetQuotedFullIdentifier();
if (GetConnection()->BackendMinimumVersion(9, 2) && GetSecurityBarrier().Length() > 0)
sql += wxT(" WITH (security_barrier=") + GetSecurityBarrier() + wxT(")");
sql += wxT(" AS \n")
+ GetFormattedDefinition()
+ wxT("\n\n")
+ GetOwnerSql(7, 3, wxT("TABLE ") + GetQuotedFullIdentifier());
if (GetConnection()->BackendMinimumVersion(8, 2))
sql += GetGrant(wxT("arwdxt"), wxT("TABLE ") + GetQuotedFullIdentifier());
else
sql += GetGrant(wxT("arwdRxt"), wxT("TABLE ") + GetQuotedFullIdentifier());
sql += GetCommentSql()
+ wxT("\n");
pgCollection *columns = browser->FindCollection(columnFactory, GetId());
if (columns)
{
wxString defaults, comments;
columns->ShowTreeDetail(browser);
treeObjectIterator colIt(browser, columns);
pgColumn *column;
while ((column = (pgColumn *)colIt.GetNextObject()) != 0)
{
column->ShowTreeDetail(browser);
if (column->GetColNumber() > 0)
{
if (!column->GetDefault().IsEmpty())
{
defaults += wxT("ALTER TABLE ") + GetQuotedFullIdentifier()
+ wxT(" ALTER COLUMN ") + column->GetQuotedIdentifier()
+ wxT(" SET DEFAULT ") + column->GetDefault()
+ wxT(";\n");
}
comments += column->GetCommentSql();
}
}
if (!defaults.IsEmpty())
sql += defaults + wxT("\n");
if (!comments.IsEmpty())
sql += comments + wxT("\n");
if (GetConnection()->BackendMinimumVersion(9, 1))
sql += GetSeqLabelsSql();
}
AppendStuff(sql, browser, ruleFactory);
AppendStuff(sql, browser, triggerFactory);
}
return sql;
}
示例14: wxT
wxString pgConversion::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Conversion: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- DROP CONVERSION ") + GetQuotedFullIdentifier() + wxT(";")
+ wxT("\n\nCREATE ");
if (GetDefaultConversion())
sql += wxT("DEFAULT ");
sql += wxT("CONVERSION ") + qtIdent(GetName())
+ wxT("\n FOR '") + GetForEncoding() + wxT("'")
+ wxT("\n TO '") + GetToEncoding() + wxT("'")
+ wxT("\n FROM ") + GetDatabase()->GetQuotedSchemaPrefix(GetProcNamespace())
+ qtIdent(GetProc()) + wxT(";\n")
+ GetOwnerSql(8, 0);
}
return sql;
}
示例15: UpdateValues
wxString pgSequence::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
UpdateValues();
sql = wxT("-- Sequence: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- DROP SEQUENCE ") + GetQuotedFullIdentifier() + wxT(";")
+ wxT("\n\nCREATE SEQUENCE ") + GetQuotedFullIdentifier()
+ wxT("\n INCREMENT ") + GetIncrement().ToString()
+ wxT("\n MINVALUE ") + GetMinValue().ToString()
+ wxT("\n MAXVALUE ") + GetMaxValue().ToString()
+ wxT("\n START ") + GetLastValue().ToString()
+ wxT("\n CACHE ") + GetCacheValue().ToString();
if (GetCycled())
sql += wxT("\n CYCLE");
sql += wxT(";\n")
+ GetOwnerSql(7, 3, wxT("TABLE ") + GetQuotedFullIdentifier());
if (!GetConnection()->BackendMinimumVersion(8, 2))
sql += GetGrant(wxT("arwdRxt"), wxT("TABLE ") + GetQuotedFullIdentifier());
else
sql += GetGrant(wxT("rwU"), wxT("TABLE ") + GetQuotedFullIdentifier());
sql += GetCommentSql();
if (GetConnection()->BackendMinimumVersion(9, 1))
sql += GetSeqLabelsSql();
}
return sql;
}