Permalink
Browse files

Make style

  • Loading branch information...
1 parent e33eab7 commit 98c52e896ca6e5733d96613b974f84786782e473 @dpage dpage committed Dec 14, 2012
@@ -146,7 +146,7 @@ int pgQueryThread::execute()
if (PQresultStatus(res) == PGRES_COPY_IN)
{
PQputCopyEnd(conn->conn, "not supported by pgAdmin");
- }
+ }
if (PQresultStatus(res) == PGRES_COPY_OUT)
{
int copyrc;
@@ -164,7 +164,8 @@ int pgQueryThread::execute()
{
wxString str(buf, wxConvUTF8);
appendMessageRaw(str);
- } else if (copyrows == 100)
+ }
+ else if (copyrows == 100)
appendMessage(_("Query returned more than 100 COPY rows, discarding the rest...\n"));
PQfreemem(buf);
@@ -1018,7 +1018,7 @@ void ctlCodeWindow::clearSourceCache()
// Put a dummy entry for invalid function OID to the cache. This is
// displayed at least for inline code blocks, as we currently have
// no way to fetch the source for those.
- m_sourceCodeMap[wxT("0")] = wsCodeCache(wxT("0"), wxT("0"), wxT("<source not available>"), wxT(""));
+ m_sourceCodeMap[wxT("0")] = wsCodeCache(wxT("0"), wxT("0"), wxT("<source not available>"), wxT(""));
}
////////////////////////////////////////////////////////////////////////////////
@@ -979,7 +979,7 @@ wxString dlgFunction::GetSql()
if (function)
{
name = schema->GetQuotedPrefix() + qtIdent(name)
- + wxT("(") + GetArgs(false, true) + wxT(")");
+ + wxT("(") + GetArgs(false, true) + wxT(")");
AppendOwnerChange(sql, wxT("FUNCTION ") + name);
AppendSchemaChange(sql, wxT("FUNCTION ") + name);
View
@@ -363,8 +363,8 @@ void frmMain::OnPropRightClick(wxListEvent &event)
void frmMain::OnTreeSelChanged(wxTreeEvent &event)
{
/*
- * Do not honour the tree selection change, while a property dialog is
- * closed and refresh is in progress
+ * Do not honour the tree selection change, while a property dialog is
+ * closed and refresh is in progress
*/
if (m_refreshing)
return;
View
@@ -515,7 +515,7 @@ void frmMain::CreateMenus()
}
-pgObject * frmMain::Refresh(pgObject *data)
+pgObject *frmMain::Refresh(pgObject *data)
{
bool done = false;
pgObject *obj = NULL;
View
@@ -216,7 +216,7 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
pgScript(new pgsApplication(_conn)),
pgsStringOutput(&pgsOutputString),
pgsOutput(pgsStringOutput, wxEOL_UNIX),
- pgsTimer(new pgScriptTimer(this)),
+ pgsTimer(new pgScriptTimer(this)),
m_loadingfile(false)
{
pgScript->SetCaller(this, PGSCRIPT_COMPLETE);
@@ -103,7 +103,7 @@ class frmMain : public pgFrame
bool CheckAlive();
void execSelChange(wxTreeItemId item, bool currentNode);
- pgObject * Refresh(pgObject *data);
+ pgObject *Refresh(pgObject *data);
void ExecDrop(bool cascaded);
void ShowObjStatistics(pgObject *data, wxWindow *ctrl = NULL);
@@ -59,7 +59,7 @@ class gqbArrayCollection : public gqbCollectionBase
void insertAtIndex(gqbObject *item, int index);
void deleteAll();
void removeAll();
- gqbObject*&operator[](size_t index)
+ gqbObject *&operator[](size_t index)
{
return gqbArray[index];
}
@@ -67,7 +67,7 @@ class hdArrayCollection : public hdCollectionBase
void replaceAtIndex(hdObject *item, int index);
void deleteAll();
void removeAll();
- hdObject*&operator[](size_t index)
+ hdObject *&operator[](size_t index)
{
return ddArray[index];
}
@@ -53,7 +53,7 @@ class pgSequence : public pgSchemaObject
}
wxLongLong GetNextValue() const
{
- return nextValue;
+ return nextValue;
}
wxLongLong GetMinValue() const
{
@@ -236,15 +236,15 @@ pgObject *edbPackageFactory::CreateObjects(pgCollection *collection, ctlTree *br
if (collection->GetConnection()->EdbMinimumVersion(8, 2))
{
- whereclause = wxT(" WHERE nspparent = ") + NumToStr(collection->GetSchema()->GetOid()) + wxT("::oid\n");
+ whereclause = wxT(" WHERE nspparent = ") + NumToStr(collection->GetSchema()->GetOid()) + wxT("::oid\n");
if (collection->GetConnection()->EdbMinimumVersion(9, 2))
whereclause += wxT(" AND nspobjecttype = 0 ");
sql = wxT("SELECT nsp.oid, nsp.xmin, nspname AS pkgname,\n") + pkgsrc +
wxT(" nspacl AS pkgacl, pg_get_userbyid(nspowner) AS owner, description\n")
wxT(" FROM pg_namespace nsp")
wxT(" LEFT OUTER JOIN pg_description des ON (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)\n")
- + whereclause
+ + whereclause
+ restriction +
wxT(" ORDER BY nspname;");
}
@@ -349,12 +349,12 @@ wxString pgColumn::GetDefinition()
if (GetDatabase()->BackendMinimumVersion(8, 1))
{
pgSet *set = ExecuteSet(
- wxT("SELECT classid\n")
- wxT(" FROM pg_depend\n")
- wxT(" WHERE refobjid=") + table->GetOidStr() +
- wxT(" AND refobjsubid = ") + NumToStr(GetColNumber()) +
- wxT(" AND objid = '") + full_tabname + wxT("'::regclass") +
- wxT(" AND deptype='a'"));
+ wxT("SELECT classid\n")
+ wxT(" FROM pg_depend\n")
+ wxT(" WHERE refobjid=") + table->GetOidStr() +
+ wxT(" AND refobjsubid = ") + NumToStr(GetColNumber()) +
+ wxT(" AND objid = '") + full_tabname + wxT("'::regclass") +
+ wxT(" AND deptype='a'"));
if (set && set->NumRows())
{
View
@@ -1451,16 +1451,16 @@ pgObject *pgTableFactory::CreateObjects(pgCollection *collection, ctlTree *brows
wxT(", substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age \n")
wxT(", substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age \n")
wxT(", substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') AS toast_autovacuum_enabled \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.][0-9]*)') AS toast_autovacuum_vacuum_scale_factor \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.][0-9]*)') AS toast_autovacuum_analyze_scale_factor \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age \n")
- wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') AS toast_autovacuum_enabled \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.][0-9]*)') AS toast_autovacuum_vacuum_scale_factor \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.][0-9]*)') AS toast_autovacuum_analyze_scale_factor \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age \n")
+ wxT(", substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age \n")
wxT(", rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions \n")
wxT(", (CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable\n");
}

0 comments on commit 98c52e8

Please sign in to comment.