当前位置: 首页>>代码示例>>C++>>正文


C++ qtIdent函数代码示例

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


在下文中一共展示了qtIdent函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetName

wxString dlgTablespace::GetSql2()
{
	wxString sql;
	wxString name = GetName();

	if (!tablespace)
	{
		sql += GetGrant(wxT("C"), wxT("TABLESPACE ") + qtIdent(name));
		AppendComment(sql, wxT("TABLESPACE"), 0, tablespace);

		// check for changed or added vars
		for (int pos = 0 ; pos < lstVariables->GetItemCount() ; pos++)
		{
			sql += wxT("ALTER TABLESPACE ") + qtIdent(name)
			       +  wxT("\n  SET (") + lstVariables->GetText(pos)
			       +  wxT("=") + lstVariables->GetText(pos, 1)
			       +  wxT(");\n");
		}
	}

	return sql;
}
开发者ID:xiul,项目名称:pgadmin3,代码行数:22,代码来源:dlgTablespace.cpp

示例2: wxT

wxString frmBackup::getCmdPart1()
{
	pgServer *server = object->GetDatabase()->GetServer();

	wxString cmd = backupExecutable;

	if (!server->GetName().IsEmpty())
		cmd += wxT(" --host ") + server->GetName();

	cmd +=  wxT(" --port ") + NumToStr((long)server->GetPort())
	        +  wxT(" --username ") + commandLineCleanOption(qtIdent(server->GetUsername()));

	if (!cbRolename->GetValue().IsEmpty())
		cmd += wxT(" --role ") + commandLineCleanOption(qtIdent(cbRolename->GetValue()));

	if (pgAppMinimumVersion(backupExecutable, 8, 4))
		cmd += wxT(" --no-password ");

	if (object->GetConnection()->GetIsGreenplum())
		cmd += wxT(" --gp-syntax ");
	return cmd;
}
开发者ID:AnnaSkawinska,项目名称:pgadmin3,代码行数:22,代码来源:frmBackup.cpp

示例3: wxT

int dlgCollation::Go(bool modal)
{
	if (collation)
	{
		// edit mode
		txtLcCollate->SetValue(collation->GetLcCollate());
		txtLcCtype->SetValue(collation->GetLcCtype());

		txtLocale->Disable();
		txtLcCollate->Disable();
		txtLcCtype->Disable();
		cbCollation->Disable();
	}
	else
	{
		// create mode
		// fill collation combobox
		cbCollation->Append(wxEmptyString);
		pgSet *set = connection->ExecuteSet(
		                 wxT("SELECT nspname, collname\n")
		                 wxT("  FROM pg_collation c, pg_namespace n\n")
		                 wxT("  WHERE c.collnamespace=n.oid\n")
		                 wxT("  ORDER BY nspname, collname"));
		if (set)
		{
			while (!set->Eof())
			{
				wxString name = qtIdent(set->GetVal(wxT("nspname"))) + wxT(".") + qtIdent(set->GetVal(wxT("collname")));
				cbCollation->Append(name);
				set->MoveNext();
			}
			delete set;
		}
		cbCollation->SetSelection(0);
	}

	return dlgProperty::Go(modal);
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:38,代码来源:dlgCollation.cpp

示例4: wxT

wxString frmRestore::getCmdPart1()
{
    wxString cmd;

    cmd = restoreExecutable;

    if (!server->GetName().IsEmpty())
        cmd += wxT(" --host ") + server->GetName();

    cmd += wxT(" --port ") + NumToStr((long)server->GetPort())
         + wxT(" --username ") + qtIdent(server->GetUsername())
         + wxT(" --dbname ") + commandLineCleanOption(object->GetDatabase()->GetQuotedIdentifier());
    return cmd;
}
开发者ID:xiul,项目名称:Database-Designer-for-pgAdmin,代码行数:14,代码来源:frmRestore.cpp

示例5: wxT

wxString dlgForeignServer::GetSql()
{
	wxString sql, name;
	name = txtName->GetValue();

	if (foreignserver)
	{
		// edit mode
		if (txtVersion->GetValue() != foreignserver->GetVersion())
		{
			sql = wxT("ALTER SERVER ") + qtIdent(name)
			      + wxT(" VERSION ") + qtDbString(txtVersion->GetValue()) + wxT(";\n");
		}

		wxString sqloptions = GetOptionsSql();
		if (sqloptions.Length() > 0)
		{
			sql += wxT("ALTER SERVER ") + name
			       + wxT(" OPTIONS (") + sqloptions + wxT(");\n");
		}

		AppendOwnerChange(sql, wxT("SERVER ") + qtIdent(name));
	}
	else
	{
		// create mode
		sql = wxT("CREATE SERVER ") + qtIdent(name);
		if (!(txtType->GetValue()).IsEmpty())
			sql += wxT("\n   TYPE ") + qtDbString(txtType->GetValue());
		if (!(txtVersion->GetValue()).IsEmpty())
			sql += wxT("\n   VERSION ") + qtDbString(txtVersion->GetValue());
		sql += wxT("\n   FOREIGN DATA WRAPPER ") + qtIdent(foreigndatawrapper->GetName());

		// check for options
		if (lstOptions->GetItemCount() > 0)
		{
			wxString options = wxEmptyString;
			for (int pos = 0 ; pos < lstOptions->GetItemCount() ; pos++)
			{
				if (options.Length() > 0)
					options += wxT(", ");

				options += lstOptions->GetText(pos, 0)
				           + wxT(" '") + lstOptions->GetText(pos, 1) + wxT("' ");
			}
			sql += wxT("\n  OPTIONS (") + options + wxT(")");
		}

		sql += wxT(";\n");
		AppendOwnerNew(sql, wxT("SERVER ") + qtIdent(name));
	}

	sql += GetGrant(wxT("U"), wxT("SERVER ") + qtIdent(name));
	AppendComment(sql, wxT("SERVER"), 0, foreignserver);

	return sql;
}
开发者ID:Timosha,项目名称:pgadmin3,代码行数:57,代码来源:dlgForeignServer.cpp

示例6: wxT

wxString dlgSynonym::GetSql()
{
	wxString sql;

	if (!synonymSchema)
	{

		sql = wxT("CREATE OR REPLACE PUBLIC SYNONYM ") + qtIdent(txtName->GetValue()) + wxT("\n FOR ");

		if (cbTargetSchema->GetValue() != wxEmptyString)
			sql += qtIdent(cbTargetSchema->GetValue()) + wxT(".");

		sql += qtIdent(cbTargetObject->GetValue()) + wxT(";\n");

		AppendComment(sql, wxT("PUBLIC SYNONYM ") + qtIdent(txtName->GetValue()), synonym);
	}
	else
	{
		wxString createSql, commentSql;
		if (synonymSchema->GetName() == wxT("public"))
		{
			createSql = wxT("CREATE OR REPLACE PUBLIC SYNONYM ");
			commentSql = wxT("PUBLIC SYNONYM ");
		}
		else
		{
			createSql = wxT("CREATE OR REPLACE SYNONYM ") + qtIdent(synonymSchema->GetName()) + wxT(".");
			commentSql = wxT("PRIVATE SYNONYM ");
		}

		sql = createSql + qtIdent(txtName->GetValue()) + wxT("\n FOR ");

		if (cbTargetSchema->GetValue() != wxEmptyString)
			sql += qtIdent(cbTargetSchema->GetValue()) + wxT(".");

		sql += qtIdent(cbTargetObject->GetValue()) + wxT(";\n");

		AppendComment(sql, commentSql + qtIdent(txtName->GetValue()), synonym);
	}

	return sql;
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:42,代码来源:dlgSynonym.cpp

示例7: qtIdent

wxString dlgPackage::GetSql()
{
	wxString sql;
	wxString qtName = schema->GetQuotedSchemaPrefix(schema->GetName()) + qtIdent(txtName->GetValue());

	if (!package || (package && txtHeader->GetText() != package->GetHeaderInner()))
	{
		if (package)
			sql = wxT("DROP PACKAGE BODY ") + qtName + wxT(";\n\n");

		sql += wxT("CREATE OR REPLACE PACKAGE ") + qtName + wxT("\nIS\n");
		sql += txtHeader->GetText();
		sql += wxT("\nEND ") + qtIdent(txtName->GetValue()) + wxT(";\n\n");
	}

	if (!package || (package && txtBody->GetText() != package->GetBodyInner())
	        || (package && txtHeader->GetText() != package->GetHeaderInner()))
	{
		if (!txtBody->GetText().Trim().IsEmpty())
		{
			sql += wxT("CREATE OR REPLACE PACKAGE BODY ") + qtName + wxT("\nIS\n");
			sql += txtBody->GetText().Trim().Trim(false);
			sql += wxT("\nEND ") + qtIdent(txtName->GetValue()) + wxT(";\n\n");
		}
		else
		{
			if (package && !package->GetBodyInner().Trim().IsEmpty())
				sql = wxT("DROP PACKAGE BODY ") + qtName + wxT(";\n\n");
		}
	}

	sql += GetGrant(wxT("X"), wxT("PACKAGE ") + qtName);

	AppendComment(sql, wxT("PACKAGE"), schema, package);

	return sql;
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:37,代码来源:dlgPackage.cpp

示例8: wxT

wxString dlgForeignKey::GetDefinition()
{
    wxString sql;
    wxString cols, refs;

    int pos;

    for (pos=0 ; pos < lstColumns->GetItemCount() ; pos++)
    {
        if (pos)
        {
            cols += wxT(", ");
            refs += wxT(", ");
        }
        cols += qtIdent(lstColumns->GetText(pos));
        refs += qtIdent(lstColumns->GetText(pos, 1));
    }

    sql = wxT("(") + cols 
        + wxT(") REFERENCES ");
    AppendQuoted(sql, cbReferences->GetValue());
    sql += wxT(" (") + refs
        + wxT(")");

    if (chkMatchFull->GetValue())
        sql += wxT(" MATCH FULL");

    sql += wxT("\n  ")
           wxT(" ON UPDATE ") + rbOnUpdate->GetStringSelection() +
           wxT(" ON DELETE ") + rbOnDelete->GetStringSelection();

    if (chkDeferrable->GetValue())
        sql += wxT("\n   DEFERRABLE");
    if (chkDeferred->GetValue())
        sql += wxT(" INITIALLY DEFERRED");
    return sql;
}
开发者ID:lhcezar,项目名称:pgadmin3,代码行数:37,代码来源:dlgForeignKey.cpp

示例9: GetName

wxString dlgIndexConstraint::GetSql()
{
	wxString sql;
	wxString name = GetName();

	if (!index)
	{
		sql = wxT("ALTER TABLE ") + table->GetQuotedFullIdentifier()
		      + wxT("\n  ADD");
		AppendIfFilled(sql, wxT(" CONSTRAINT "), qtIdent(name));

		sql += wxT(" ") + wxString(factory->GetTypeName()).Upper() + wxT(" ") + GetDefinition()
		       + wxT(";\n");
	}
	else
	{
		if (connection->BackendMinimumVersion(8, 0) && cbTablespace->GetOIDKey() != index->GetTablespaceOid())
		{
			sql += wxT("ALTER INDEX ") + index->GetSchema()->GetQuotedIdentifier() + wxT(".") + qtIdent(name)
			       +  wxT("\n  SET TABLESPACE ") + qtIdent(cbTablespace->GetValue())
			       + wxT(";\n");
		}

		if (txtFillFactor->GetValue().Trim().Length() > 0 && txtFillFactor->GetValue() != index->GetFillFactor())
		{
			sql += wxT("ALTER INDEX ") + index->GetSchema()->GetQuotedIdentifier() + wxT(".") + qtIdent(name)
			       +  wxT("\n  SET (FILLFACTOR=")
			       +  txtFillFactor->GetValue() + wxT(");\n");
		}
	}

	if (!name.IsEmpty())
		AppendComment(sql, wxT("CONSTRAINT ") + qtIdent(name)
		              + wxT(" ON ") + table->GetQuotedFullIdentifier(), index);

	return sql;
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:37,代码来源:dlgIndexConstraint.cpp

示例10: wxT

wxString dlgIndexConstraint::GetDefinition()
{
	wxString sql = wxEmptyString;

	if (cbIndex->GetCurrentSelection() > 0)
	{
		sql += wxT(" USING INDEX ") + qtIdent(cbIndex->GetValue());
	}
	else
	{
		if (cbType->GetCurrentSelection() > 0)
			AppendIfFilled(sql, wxT(" USING "), cbType->GetValue());

		sql += wxT("(") + GetColumns() + wxT(")");

		if (txtFillFactor)
		{
			if (connection->BackendMinimumVersion(8, 2) && txtFillFactor->GetValue().Length() > 0)
				sql += wxT("\n  WITH (FILLFACTOR=") + txtFillFactor->GetValue() + wxT(")");
		}

		if (cbTablespace->GetOIDKey() > 0)
			sql += wxT(" USING INDEX TABLESPACE ") + qtIdent(cbTablespace->GetValue());

		if (chkDeferrable->GetValue())
		{
			sql += wxT(" DEFERRABLE");
			if (chkDeferred->GetValue())
				sql += wxT(" INITIALLY DEFERRED");
		}

		if (txtWhere->GetValue().Length() > 0)
			sql += wxT(" WHERE (") + txtWhere->GetValue() + wxT(")");
	}

	return sql;
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:37,代码来源:dlgIndexConstraint.cpp

示例11: 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

示例12: wxT

wxString edbPrivateSynonym::GetSql(ctlTree *browser)
{
    if (sql.IsNull())
    {
        if (isPublic)
            sql = wxT("-- Public synonym: ") + GetQuotedIdentifier() + wxT("\n\n") +
                  wxT("-- DROP PUBLIC SYNONYM ") + GetQuotedIdentifier();
        else
            sql = wxT("-- Private synonym: ") + GetSchema()->GetQuotedIdentifier() + wxT(".") + GetQuotedIdentifier() + wxT("\n\n") +
                  wxT("-- DROP SYNONYM ") + GetSchema()->GetQuotedIdentifier() + wxT(".") + GetQuotedIdentifier();

        if (isPublic)
            sql += wxT("\n\nCREATE OR REPLACE PUBLIC SYNONYM ") + GetQuotedIdentifier() + wxT(" FOR ");
        else
            sql += wxT("\n\nCREATE OR REPLACE SYNONYM ") + GetSchema()->GetQuotedIdentifier() + wxT(".") + GetQuotedIdentifier() + wxT(" FOR ");

        if (GetTargetSchema() != wxEmptyString)
            sql += qtIdent(GetTargetSchema()) + wxT(".");

        sql += qtIdent(GetTargetObject()) + wxT(";\n");
    }

    return sql;
}
开发者ID:lhcezar,项目名称:pgadmin3,代码行数:24,代码来源:edbPrivateSynonym.cpp

示例13: wxT

wxString frmBackupGlobals::getCmdPart1()
{
	pgServer *server;
	if (object->GetMetaType() == PGM_SERVER)
		server = (pgServer *)object;
	else
		server = object->GetDatabase()->GetServer();

	wxString cmd = backupExecutable;

	if (!server->GetName().IsEmpty())
		cmd += wxT(" --host ") + server->GetName();

	cmd +=  wxT(" --port ") + NumToStr((long)server->GetPort())
	        +  wxT(" --username ") + commandLineCleanOption(qtIdent(server->GetUsername()));

	if (!cbRolename->GetValue().IsEmpty())
		cmd += wxT(" --role ") + commandLineCleanOption(qtIdent(cbRolename->GetValue()));

	if (pgAppMinimumVersion(backupExecutable, 8, 4))
		cmd += wxT(" --no-password ");

	return cmd;
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:24,代码来源:frmBackupGlobals.cpp

示例14: GetName

wxString dlgForeignKey::GetSql()
{
	wxString sql;
	wxString name = GetName();

	if (!foreignKey)
	{
		sql = wxT("ALTER TABLE ") + table->GetQuotedFullIdentifier()
		      + wxT("\n  ADD");
		AppendIfFilled(sql, wxT(" CONSTRAINT "), qtIdent(name));
		sql += wxT(" FOREIGN KEY ") + GetDefinition()
		       + wxT(";\n");
	}
	else
	{
		if (foreignKey->GetName() != name)
		{
			sql = wxT("ALTER TABLE ") + table->GetQuotedFullIdentifier()
			      + wxT("\n  RENAME CONSTRAINT ") + qtIdent(foreignKey->GetName())
			      + wxT(" TO ") + qtIdent(name) + wxT(";\n");
		}
		if (connection->BackendMinimumVersion(9, 1) && !foreignKey->GetValid() && !chkDontValidate->GetValue())
		{
			sql += wxT("ALTER TABLE ") + table->GetQuotedFullIdentifier()
			       + wxT("\n  VALIDATE CONSTRAINT ") + qtIdent(name) + wxT(";\n");
		}
	}

	if (!name.IsEmpty())
		AppendComment(sql, wxT("CONSTRAINT ") + qtIdent(name)
		              + wxT(" ON ") + table->GetQuotedFullIdentifier(), foreignKey);

	if (chkAutoIndex->GetValue())
	{
		sql += wxT("CREATE INDEX ") + qtIdent(txtIndexName->GetValue())
		       +  wxT("\n  ON ") + table->GetQuotedFullIdentifier()
		       +  wxT("(");

		int pos;
		for (pos = 0 ; pos < lstColumns->GetItemCount() ; pos++)
		{
			if (pos)
				sql += wxT(", ");

			sql += qtIdent(lstColumns->GetText(pos));
		}

		sql += wxT(");\n");
	}
	return sql;
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:51,代码来源:dlgForeignKey.cpp

示例15: wxT

wxString dlgTrigger::GetColumns()
{
	wxString sql;

	int pos;
	// iterate cols
	for (pos = 0 ; pos < lstColumns->GetItemCount() ; pos++)
	{
		if (pos)
			sql += wxT(", ");

		sql += qtIdent(lstColumns->GetItemText(pos));
	}
	return sql;
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:15,代码来源:dlgTrigger.cpp


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