from pyramid.view import view_config
import pgwui_core.forms
+import pgwui_core.sql
import pgwui_core.utils
from pgwui_core.core import (
UploadEngine,
NoTransactionEngine,
SessionDBHandler,
- LogSQLCommand,
- SQLData,
NoOpProcessor,
- ExecuteSQL,
)
from pgwui_core.exceptions import AuthFailError
Side Effects:
Yes, lots.
'''
- return ExecuteSQL(ue, self)
+ return pgwui_core.sql.ExecuteSQL(ue, self)
def render(self, errors, result):
'''Instead of rendering, just our results so we can
to_db = uf['to_db']
# Drop the schema
- sql.append(LogSQLCommand(
+ sql.append(pgwui_core.sql.LogSQLCommand(
'DROP SCHEMA {0} CASCADE'.format(schema),
(),
lambda ex: copy_ex.DropSchemaError(ex, schema, to_db),
log_failure=self.log_dropschema_failure))
# Vacuum the target db
- sql.append(LogSQLCommand(
+ sql.append(pgwui_core.sql.LogSQLCommand(
'VACUUM FULL',
(),
lambda ex: copy_ex.VacuumFullError(ex, to_db),
log_success=self.log_vacuumfull_success,
log_failure=self.log_vacuumfull_failure))
- self.data = SQLData(sql)
+ self.data = pgwui_core.sql.SQLData(sql)
class VacuumHandler(CopySchemaHandler):
to_db = uf['to_db']
# Vacuum the target db
- sql.append(LogSQLCommand(
+ sql.append(pgwui_core.sql.LogSQLCommand(
'VACUUM ANALYZE',
(),
lambda ex: copy_ex.VacuumAnalyzeError(ex, to_db),
log_success=self.log_vacuumanalyze_success,
log_failure=self.log_vacuumanalyze_failure))
- self.data = SQLData(sql)
+ self.data = pgwui_core.sql.SQLData(sql)
class CheckFromSchemaEngine(UploadEngine):