本文整理汇总了C++中GetComment函数的典型用法代码示例。如果您正苦于以下问题:C++ GetComment函数的具体用法?C++ GetComment怎么用?C++ GetComment使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetComment函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: 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;
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:35,代码来源:pgOperator.cpp
示例2: loadXMLFile
bool loadXMLFile (TiXmlDocument &pXMLDoc, std::string XMLFilename, std::map<int,
std::string> * pMapXmlStrings, bool isSourceFile)
{
if (!pXMLDoc.LoadFile(XMLFilename.c_str()))
{
printf ("%s %s\n", pXMLDoc.ErrorDesc(), XMLFilename.c_str());
return false;
}
if (isSourceFile) GetEncoding(&pXMLDoc, sourceXMLEncoding);
else GetEncoding(&pXMLDoc, foreignXMLEncoding);
TiXmlElement* pRootElement = pXMLDoc.RootElement();
if (!pRootElement || pRootElement->NoChildren() || pRootElement->ValueTStr()!="strings")
{
printf ("error: No root element called: \"strings\" or no child found in input XML file: %s\n",
XMLFilename.c_str());
return false;
}
if (isSourceFile) GetComment(pRootElement->FirstChild(), -1);
const TiXmlElement *pChildElement = pRootElement->FirstChildElement("string");
const char* pAttrId = NULL;
const char* pValue = NULL;
std::string valueString;
int id;
while (pChildElement)
{
pAttrId=pChildElement->Attribute("id");
if (pAttrId && !pChildElement->NoChildren())
{
id = atoi(pAttrId);
if (pMapXmlStrings->find(id) == pMapXmlStrings->end())
{
pValue = pChildElement->FirstChild()->Value();
valueString = EscapeLF(pValue);
if (isSourceFile)
multimapSourceXmlStrings.insert(std::pair<std::string,int>( valueString,id));
(*pMapXmlStrings)[id] = valueString;
if (pChildElement && isSourceFile) GetComment(pChildElement->NextSibling(), id);
}
}
pChildElement = pChildElement->NextSiblingElement("string");
}
// Free up the allocated memory for the XML file
pXMLDoc.Clear();
return true;
}
开发者ID:mad-max,项目名称:xbmc-xml2po,代码行数:51,代码来源:xbmc-xml2po.cpp
示例3: qWarning
QStandardItem* QuarkManager::MakeItem (const QString& id) const
{
auto item = Finder_->FindItem (id);
if (!item)
{
qWarning () << Q_FUNC_INFO
<< "item not found"
<< id;
return 0;
}
ImageProv_->AddItem (item);
auto modelItem = new QStandardItem;
modelItem->setData (item->GetPermanentID (), LaunchModel::Roles::PermanentID);
const auto& curLang = Util::GetLanguage ().toLower ();
auto descr = item->GetComment (curLang);
if (descr.isEmpty ())
descr = item->GetGenericName (curLang);
auto name = item->GetName (curLang);
if (!descr.isEmpty ())
name += " (" + descr + ")";
modelItem->setData (name, LaunchModel::Roles::AppName);
return modelItem;
}
开发者ID:trett,项目名称:leechcraft,代码行数:29,代码来源:quarkmanager.cpp
示例4: ForwardLabel
void ForwardLabel (unsigned Offs)
/* If necessary, output a forward label, one that is within the next few
* bytes and is therefore output as "label = * + x".
*/
{
/* Calculate the actual address */
unsigned long Addr = PC + Offs;
/* Get the type of the label */
attr_t A = GetLabelAttr (Addr);
/* If there is no label, or just a dependent one, bail out */
if (A == atNoLabel || (A & atDepLabel) != 0) {
return;
}
/* An unnamed label cannot be output as a forward declaration, so this is
* an error.
*/
if (A == atUnnamedLabel) {
Error ("Cannot define unnamed label at address $%04lX", Addr);
}
/* Output the label */
DefForward (GetLabelName (Addr), GetComment (Addr), Offs);
}
开发者ID:AntiheroSoftware,项目名称:cc65,代码行数:26,代码来源:labels.c
示例5: UpdateValues
void pgSequence::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
UpdateValues();
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("ACL"), GetAcl());
properties->AppendItem(_("Current value"), GetLastValue());
properties->AppendItem(_("Next value"), GetNextValue());
properties->AppendItem(_("Minimum"), GetMinValue());
properties->AppendItem(_("Maximum"), GetMaxValue());
properties->AppendItem(_("Increment"), GetIncrement());
properties->AppendItem(_("Cache"), GetCacheValue());
properties->AppendYesNoItem(_("Cycled?"), GetCycled());
properties->AppendYesNoItem(_("Called?"), GetCalled());
properties->AppendYesNoItem(_("System sequence?"), GetSystemObject());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
if (!GetLabels().IsEmpty())
{
wxArrayString seclabels = GetProviderLabelArray();
if (seclabels.GetCount() > 0)
{
for (unsigned int index = 0 ; index < seclabels.GetCount() - 1 ; index += 2)
{
properties->AppendItem(seclabels.Item(index), seclabels.Item(index + 1));
}
}
}
}
}
开发者ID:gleu,项目名称:pgadmin3,代码行数:35,代码来源:pgSequence.cpp
示例6: CreateListColumns
void pgLanguage::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
if (GetConnection()->BackendMinimumVersion(8, 3))
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("ACL"), GetAcl());
properties->AppendYesNoItem(_("Trusted?"), GetTrusted());
properties->AppendItem(_("Handler function"), GetHandlerProc());
if (GetConnection()->BackendMinimumVersion(9, 0))
properties->AppendItem(_("Inline function"), GetInlineProc());
properties->AppendItem(_("Validator function"), GetValidatorProc());
properties->AppendYesNoItem(_("System language?"), GetSystemObject());
if (GetConnection()->BackendMinimumVersion(7, 5))
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
if (!GetLabels().IsEmpty())
{
wxArrayString seclabels = GetProviderLabelArray();
if (seclabels.GetCount() > 0)
{
for (unsigned int index = 0 ; index < seclabels.GetCount() - 1 ; index += 2)
{
properties->AppendItem(seclabels.Item(index), seclabels.Item(index + 1));
}
}
}
}
}
开发者ID:aiht,项目名称:pgadmin3,代码行数:33,代码来源:pgLanguage.cpp
示例7: CreateListColumns
void pgOperator::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("Kind"), GetKind());
if (!leftType.IsNull())
properties->AppendItem(_("Left type"), GetLeftType());
if (!rightType.IsNull())
properties->AppendItem(_("Right type"), GetRightType());
properties->AppendItem(_("Result type"), GetResultType());
properties->AppendItem(_("Operator function"), GetOperatorFunction());
properties->AppendItem(_("Commutator"), GetCommutator());
properties->AppendItem(_("Negator"), GetNegator());
properties->AppendItem(_("Join function"), GetJoinFunction());
properties->AppendItem(_("Restrict function"), GetRestrictFunction());
if (!GetDatabase()->BackendMinimumVersion(8, 3))
{
properties->AppendItem(_("Left Sort operator"), GetLeftSortOperator());
properties->AppendItem(_("Right Sort operator"), GetRightSortOperator());
properties->AppendItem(_("Less Than operator"), GetLessOperator());
properties->AppendItem(_("Greater than operator"), GetGreaterOperator());
}
properties->AppendYesNoItem(_("Supports hash?"), GetHashJoins());
properties->AppendYesNoItem(_("Supports merge?"), GetMergeJoins());
properties->AppendYesNoItem(_("System operator?"), GetSystemObject());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:35,代码来源:pgOperator.cpp
示例8: GetComment
void xlw::XlfFuncDesc::DoMamlDocs(std::ostream& ostr) const
{
ostr << "<introduction>" << std::endl;
XlfArgDescList& arguments = impl_->arguments_;
ostr << "<para>" << GetComment() << "</para>" << std::endl;
std::string argnames;
XlfArgDescList::const_iterator it = arguments.begin();
while (it != arguments.end())
{
argnames += (*it).GetName();
++it;
if (it != arguments.end())
argnames+=", ";
}
ostr << "<code>=" << GetAlias() << "(" << argnames << ")</code>" << std::endl;
ostr << "</introduction>" << std::endl;
ostr << "<section>" << std::endl;
ostr << " <title>Parameters</title>" << std::endl;
ostr << " <content>" << std::endl;
for (it = arguments.begin(); it != arguments.end(); ++it)
{
ostr << " <para>";
ostr << (*it).GetName() << ": " << (*it).GetComment();
ostr << "</para>" << std::endl;
}
ostr << " </content>" << std::endl;
ostr << "</section>" << std::endl;
}
开发者ID:Laeeth,项目名称:d_excelsdk,代码行数:34,代码来源:XlfFuncDesc.cpp
示例9: XlfOper
int XlfCmdDesc::AddToMenuBar(const std::string& menu, const std::string& text)
{
XLOPER xMenu;
LPXLOPER pxMenu;
LPXLOPER px;
menu_ = menu;
text_ = text;
// This is a small trick to allocate an array 5 XlfOper
// One must first allocate the array with XLOPER
// px = pxMenu = (LPXLOPER)new XLOPER[5];
px = pxMenu = new XLOPER[5];
// and then assign the XLOPER to XlfOper specifying false
// to tell the Framework that the data is not owned by
// Excel and that it should not call xlFree when destroyed
XlfOper(px++).Set(text_.c_str());
XlfOper(px++).Set(GetAlias().c_str());
XlfOper(px++).Set("");
XlfOper(px++).Set(GetComment().c_str());
XlfOper(px++).Set("");
xMenu.xltype = xltypeMulti;
xMenu.val.array.lparray = pxMenu;
xMenu.val.array.rows = 1;
xMenu.val.array.columns = 5;
int err = XlfExcel::Instance().Call(xlfAddCommand, 0, 3, (LPXLOPER)XlfOper(1.0), (LPXLOPER)XlfOper(menu_.c_str()), (LPXLOPER)&xMenu);
if (err != xlretSuccess)
std::cerr << XLW__HERE__ << "Add command " << GetName().c_str() << " to " << menu_.c_str() << " failed" << std::endl;
delete[] pxMenu;
return err;
}
开发者ID:jabogithub,项目名称:fann-excel,代码行数:33,代码来源:XlfCmdDesc.cpp
示例10: AfxMessageBox
BOOL CWedDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
BOOL retval = FALSE;
if(GetNumOfDocs() > MAX_DOC_LIMIT)
{
AfxMessageBox("Too many open documents");
return FALSE;
}
// For originial document properties
_stat(lpszPathName, &docstat); docstat2 = docstat;
// Load as usual
retval = CDocument::OnOpenDocument(lpszPathName);
//P2N("Opened document %s\r\n", lpszPathName);
// Get the undo/redo
LoadUndo(lpszPathName); LoadRedo(lpszPathName);
// Used by IsDocModified()
undoorig = undo.GetCount();
//P2N("Undo orig = %d\r\n", undoorig);
SaveBackup(lpszPathName);
// Assign comment file
GetComment(lpszPathName);
return(retval);
}
开发者ID:akavel,项目名称:wed-editor,代码行数:33,代码来源:weddoc.cpp
示例11: CreateListColumns
void pgaStep::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids = true;
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("ID"), GetRecId());
properties->AppendYesNoItem(_("Enabled"), GetEnabled());
properties->AppendItem(_("Kind"), GetKind());
if (GetConnStr().IsEmpty())
properties->AppendItem(_("Database"), GetDbname());
else
properties->AppendItem(_("Connection String"), GetConnStr());
properties->AppendItem(_("Code"), GetCode());
properties->AppendItem(_("On error"), GetOnError());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:25,代码来源:pgaStep.cpp
示例12: CreateListColumns
void pgaSchedule::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids = true;
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("ID"), GetRecId());
properties->AppendYesNoItem(_("Enabled"), GetEnabled());
properties->AppendItem(_("Start date"), GetStart());
properties->AppendItem(_("End date"), GetEnd());
properties->AppendItem(_("Minutes"), GetMinutesString());
properties->AppendItem(_("Hours"), GetHoursString());
properties->AppendItem(_("Weekdays"), GetWeekdaysString());
properties->AppendItem(_("Monthdays"), GetMonthdaysString());
properties->AppendItem(_("Months"), GetMonthsString());
properties->AppendItem(_("Exceptions"), GetExceptionsString());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
开发者ID:dragansah,项目名称:pgadmin3,代码行数:27,代码来源:pgaSchedule.cpp
示例13: CreateListColumns
void pgRule::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (properties)
{
CreateListColumns(properties);
wxString def = GetFormattedDefinition();
if (!def.IsEmpty())
{
int doPos = def.Find(wxT(" DO INSTEAD "));
if (doPos > 0)
def = def.Mid(doPos + 12).Strip(wxString::both);
else
{
doPos = def.Find(wxT(" DO "));
if (doPos > 0)
def = def.Mid(doPos + 4).Strip(wxString::both);
}
}
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Event"), GetEvent());
properties->AppendItem(_("Condition"), GetCondition());
properties->AppendYesNoItem(_("Do instead?"), GetDoInstead());
properties->AppendItem(_("Definition"), firstLineOnly(def));
if (this->GetDatabase()->connection()->BackendMinimumVersion(8, 3))
properties->AppendYesNoItem(_("Enabled?"), GetEnabled());
properties->AppendYesNoItem(_("System rule?"), GetSystemObject());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:31,代码来源:pgRule.cpp
示例14: wxLogInfo
void edbPackage::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids=true;
browser->RemoveDummyChild(this);
// Log
wxLogInfo(wxT("Adding child object to package %s"), GetIdentifier().c_str());
browser->AppendCollection(this, packageFunctionFactory);
browser->AppendCollection(this, packageProcedureFactory);
browser->AppendCollection(this, packageVariableFactory);
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("Header"), firstLineOnly(GetHeader()));
properties->AppendItem(_("Body"), firstLineOnly(GetBody()));
properties->AppendItem(_("ACL"), GetAcl());
properties->AppendItem(_("System package?"), GetSystemObject());
if (GetConnection()->EdbMinimumVersion(8, 2))
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
开发者ID:lhcezar,项目名称:pgadmin3,代码行数:32,代码来源:edbPackage.cpp
示例15: wxT
wxString pgForeignKey::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Foreign Key: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- ALTER TABLE ") + GetQuotedSchemaPrefix(fkSchema) + qtIdent(fkTable)
+ wxT(" DROP CONSTRAINT ") + GetQuotedIdentifier() + wxT(";")
+ wxT("\n\nALTER TABLE ") + GetQuotedSchemaPrefix(fkSchema) + qtIdent(fkTable)
+ wxT("\n ADD CONSTRAINT ") + GetConstraint()
+ wxT(";\n");
if (!GetComment().IsEmpty())
sql += wxT("COMMENT ON CONSTRAINT ") + GetQuotedIdentifier() + wxT(" ON ") + GetQuotedSchemaPrefix(fkSchema) + qtIdent(fkTable)
+ wxT(" IS ") + qtDbString(GetComment()) + wxT(";\n");
}
return sql;
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:17,代码来源:pgForeignKey.cpp
示例16: colIt
void pgView::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids = true;
browser->RemoveDummyChild(this);
browser->AppendCollection(this, columnFactory);
pgCollection *collection = browser->AppendCollection(this, ruleFactory);
collection->iSetOid(GetOid());
collection->ShowTreeDetail(browser);
treeObjectIterator colIt(browser, collection);
pgRule *rule;
while (!hasInsertRule && !hasUpdateRule && !hasDeleteRule && (rule = (pgRule *)colIt.GetNextObject()) != 0)
{
if (rule->GetEvent().Find(wxT("INSERT")) >= 0)
hasInsertRule = true;
if (rule->GetEvent().Find(wxT("UPDATE")) >= 0)
hasUpdateRule = true;
if (rule->GetEvent().Find(wxT("DELETE")) >= 0)
hasDeleteRule = true;
}
if (GetConnection()->BackendMinimumVersion(9, 1))
browser->AppendCollection(this, triggerFactory);
}
if (properties)
{
CreateListColumns(properties);
wxString def = GetDefinition().Left(250);
def.Replace(wxT("\n"), wxT(" "));
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Owner"), GetOwner());
properties->AppendItem(_("ACL"), GetAcl());
properties->AppendItem(_("Definition"), def);
properties->AppendYesNoItem(_("System view?"), GetSystemObject());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
if (GetConnection()->BackendMinimumVersion(9, 2) && GetSecurityBarrier().Length() > 0)
properties->AppendItem(_("Security barrier?"), GetSecurityBarrier());
if (!GetLabels().IsEmpty())
{
wxArrayString seclabels = GetProviderLabelArray();
if (seclabels.GetCount() > 0)
{
for (unsigned int index = 0 ; index < seclabels.GetCount() - 1 ; index += 2)
{
properties->AppendItem(seclabels.Item(index), seclabels.Item(index + 1));
}
}
}
}
}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:57,代码来源:pgView.cpp
示例17: throw
void TITLE_BLOCK::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControlBits ) const
throw( IO_ERROR )
{
// Don't write the title block information if there is nothing to write.
bool isempty = true;
for( unsigned idx = 0; idx < m_tbTexts.GetCount(); idx++ )
{
if( ! m_tbTexts[idx].IsEmpty() )
{
isempty = false;
break;
}
}
if( !isempty )
{
aFormatter->Print( aNestLevel, "(title_block\n" );
if( !GetTitle().IsEmpty() )
aFormatter->Print( aNestLevel+1, "(title %s)\n",
aFormatter->Quotew( GetTitle() ).c_str() );
if( !GetDate().IsEmpty() )
aFormatter->Print( aNestLevel+1, "(date %s)\n",
aFormatter->Quotew( GetDate() ).c_str() );
if( !GetRevision().IsEmpty() )
aFormatter->Print( aNestLevel+1, "(rev %s)\n",
aFormatter->Quotew( GetRevision() ).c_str() );
if( !GetCompany().IsEmpty() )
aFormatter->Print( aNestLevel+1, "(company %s)\n",
aFormatter->Quotew( GetCompany() ).c_str() );
for( int ii = 0; ii < 4; ii++ )
{
if( !GetComment(ii).IsEmpty() )
aFormatter->Print( aNestLevel+1, "(comment %d %s)\n", ii+1,
aFormatter->Quotew( GetComment(ii) ).c_str() );
}
aFormatter->Print( aNestLevel, ")\n\n" );
}
}
开发者ID:Caerbannog,项目名称:kicad-git-bzr,代码行数:44,代码来源:worksheet.cpp
示例18: wxT
wxString pgCheck::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Check: ") + GetQuotedFullIdentifier() + wxT("\n\n")
+ wxT("-- ALTER ") + objectKind + wxT(" ") + GetQuotedSchemaPrefix(objectSchema) + qtIdent(objectName)
+ wxT(" DROP CONSTRAINT ") + GetQuotedIdentifier()
+ wxT(";\n\nALTER ") + objectKind + wxT(" ") + GetQuotedSchemaPrefix(objectSchema) + qtIdent(objectName)
+ wxT("\n ADD CONSTRAINT ") + GetConstraint()
+ wxT(";\n");
if (!GetComment().IsNull())
{
sql += wxT("COMMENT ON CONSTRAINT ") + GetQuotedIdentifier()
+ wxT(" ON ") + GetQuotedSchemaPrefix(objectSchema) + qtIdent(objectName)
+ wxT(" IS ") + qtDbString(GetComment()) + wxT(";\n");
}
}
return sql;
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:21,代码来源:pgCheck.cpp
示例19: wxT
wxString pgTextSearchDictionary::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Text Search Dictionary: ") + GetFullIdentifier() + wxT("\n\n")
+ wxT("-- DROP TEXT SEARCH DICTIONARY ") + GetFullIdentifier() + wxT("\n\n")
+ wxT("CREATE TEXT SEARCH DICTIONARY ") + GetFullIdentifier() + wxT(" (")
+ wxT("\n TEMPLATE = ") + qtTypeIdent(GetTemplate());
if (options.Length() > 0)
sql += wxT(",\n ") + options;
sql += wxT("\n);\n");
if (!GetComment().IsNull())
sql += wxT("COMMENT ON TEXT SEARCH DICTIONARY ") + GetFullIdentifier()
+ wxT(" IS ") + qtDbString(GetComment()) + wxT(";\n");
}
return sql;
}
开发者ID:intgr,项目名称:pgadmin3,代码行数:21,代码来源:pgTextSearchDictionary.cpp
示例20: wxT
wxString pgRule::GetSql(ctlTree *browser)
{
if (sql.IsNull())
{
sql = wxT("-- Rule: ") + GetQuotedIdentifier() + wxT(" ON ") + GetQuotedFullTable() + wxT("\n\n")
+ wxT("-- DROP RULE ") + GetQuotedIdentifier() + wxT(" ON ") + GetQuotedFullTable() + wxT(";\n\n")
+ wxT("CREATE OR REPLACE") + GetFormattedDefinition().Mid(6) // the backend pg_get_ruledef gives CREATE only
+ wxT("\n");
if (!GetEnabled())
{
sql += wxT("ALTER TABLE ") + GetQuotedFullTable() + wxT(" ")
+ wxT("DISABLE RULE ") + GetQuotedIdentifier() + wxT(";\n");
}
if (!GetComment().IsEmpty())
sql += wxT("COMMENT ON RULE ") + GetQuotedIdentifier() + wxT(" ON ") + GetQuotedFullTable()
+ wxT(" IS ") + qtDbString(GetComment()) + wxT(";\n");
}
return sql;
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:21,代码来源:pgRule.cpp
注:本文中的GetComment函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论