• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetQuotedFullIdentifier函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetQuotedFullIdentifier函数的典型用法代码示例。如果您正苦于以下问题:C++ GetQuotedFullIdentifier函数的具体用法?C++ GetQuotedFullIdentifier怎么用?C++ GetQuotedFullIdentifier使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetQuotedFullIdentifier函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:27,代码来源:pgSchema.cpp


示例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;
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:35,代码来源:pgOperator.cpp


示例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;
}
开发者ID:aiht,项目名称:pgadmin3,代码行数:27,代码来源:pgLanguage.cpp


示例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;
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:57,代码来源:pgType.cpp


示例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;
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:54,代码来源:pgDomain.cpp


示例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;
}
开发者ID:lhcezar,项目名称:pgadmin3,代码行数:13,代码来源:pgOperatorFamily.cpp


示例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());
		}
	}
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:49,代码来源:pgRole.cpp


示例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;
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:30,代码来源:gpResQueue.cpp


示例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);
}
开发者ID:SokilV,项目名称:pgadmin3,代码行数:7,代码来源:pgForeignServer.cpp


示例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;
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:25,代码来源:pgTablespace.cpp


示例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;
}
开发者ID:lhcezar,项目名称:pgadmin3,代码行数:28,代码来源:edbPackage.cpp


示例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;
}
开发者ID:FabianCollaguazo,项目名称:pgadmin3,代码行数:8,代码来源:pgView.cpp


示例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;
}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:60,代码来源:pgView.cpp


示例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;
}
开发者ID:xiul,项目名称:Database-Designer-for-pgAdmin,代码行数:19,代码来源:pgConversion.cpp


示例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;
}
开发者ID:gleu,项目名称:pgadmin3,代码行数:31,代码来源:pgSequence.cpp


示例16: GetArgSigList

// Generate the EXEC Script SQL
wxString pgProcedure::GetExecSql(ctlTree *browser)
{
	wxString args = GetArgSigList(true);

	wxString sql = wxT("EXEC ") + GetQuotedFullIdentifier();

	if (args.Length())
		sql += wxT("(\n") + args + wxT("\n);\n");
	else
		sql += wxT(";\n");

	return sql;
}
开发者ID:intgr,项目名称:pgadmin3,代码行数:14,代码来源:pgFunction.cpp


示例17: dlg

bool pgUser::DropObject(wxFrame *frame, ctlTree *browser, bool cascaded)
{
    if (GetUpdateCatalog())
    {
        wxMessageDialog dlg(frame,
                            _("Deleting a superuser might result in unwanted behaviour (e.g. when restoring the database).\nAre you sure?"),
                            _("Confirm superuser deletion"),
                            wxICON_EXCLAMATION | wxYES_NO | wxNO_DEFAULT);
        if (dlg.ShowModal() != wxID_YES)
            return false;
    }
    return server->ExecuteVoid(wxT("DROP USER ") + GetQuotedFullIdentifier() + wxT(";"));
}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:13,代码来源:pgUser.cpp


示例18: wxT

wxString pgGroup::GetSql(ctlTree *browser)
{
	if (sql.IsNull())
	{
		sql = wxT("-- Group: ") + GetName() + wxT("\n\n")
		      + wxT("DROP GROUP ") + GetQuotedFullIdentifier() + wxT(";")
		      + wxT("\n\nCREATE Group ") + GetQuotedIdentifier()
		      + wxT("\n  WITH SYSID ") + NumToStr(groupId)
		      + wxT("\n  USER ") + quotedMembers
		      + wxT(";\n");
	}
	return sql;
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:13,代码来源:pgGroup.cpp


示例19: GetQuotedFullIdentifier

wxString pgProcedure::GetSql(ctlTree *browser)
{
	if (!GetConnection()->EdbMinimumVersion(8, 0))
		return pgFunction::GetSql(browser);

	if (sql.IsNull())
	{
		wxString qtName, qtSig;

		if (GetArgListWithNames().IsEmpty())
		{
			qtName = GetQuotedFullIdentifier();
			qtSig = GetQuotedFullIdentifier();
		}
		else
		{
			qtName = GetQuotedFullIdentifier() + wxT("(") + GetArgListWithNames() + wxT(")");
			qtSig = GetQuotedFullIdentifier()  + wxT("(") + GetArgSigList() + wxT(")");
		}

		sql = wxT("-- Procedure: ") + qtSig + wxT("\n\n")
		      + wxT("-- DROP PROCEDURE ") + qtSig + wxT(";")
		      + wxT("\n\nCREATE OR REPLACE PROCEDURE ") + qtName;


		sql += wxT(" AS")
		       + GetSource()
		       + wxT("\n\n")
		       + GetGrant(wxT("X"), wxT("PROCEDURE ") + qtSig);

		if (!GetComment().IsNull())
		{
			sql += wxT("COMMENT ON PROCEDURE ") + GetQuotedFullIdentifier()
			       + wxT(" IS ") + qtDbString(GetComment()) + wxT(";\n");
		}
	}

	return sql;
}
开发者ID:intgr,项目名称:pgadmin3,代码行数:39,代码来源:pgFunction.cpp


示例20: wxT

wxString pgForeignTable::GetSql(ctlTree *browser)
{
	if (sql.IsNull())
	{
		sql = wxT("-- Foreign Table: ") + GetQuotedFullIdentifier() + wxT("\n\n")
		      + wxT("-- DROP FOREIGN TABLE ") + GetQuotedFullIdentifier() + wxT(";")
		      + wxT("\n\nCREATE FOREIGN TABLE ") + GetQuotedFullIdentifier()
		      + wxT("\n   (") + GetQuotedTypesList()
		      + wxT(")\n   SERVER ") + GetForeignServer();

		if (!GetOptionsList().IsEmpty())
			sql += wxT("\n   OPTIONS (") + GetOptionsList() + wxT(")");

		sql += wxT(";\n")
		       + GetOwnerSql(9, 1)
		       + GetCommentSql();

		if (GetConnection()->BackendMinimumVersion(9, 1))
			sql += GetSeqLabelsSql();
	}

	return sql;
}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:23,代码来源:pgForeignTable.cpp



注:本文中的GetQuotedFullIdentifier函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetRCState函数代码示例发布时间:2022-05-30
下一篇:
C++ GetQuantumPixels函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap