Uses of Class
com.mckoi.database.DatabaseException
Packages that use DatabaseException
Package
Description
The core database classes for Mckoi.
-
Uses of DatabaseException in com.mckoi.database
Subclasses of DatabaseException in com.mckoi.databaseModifier and TypeClassDescriptionclass
An exception that is thrown when the user is not permitted to perform a certain action.Methods in com.mckoi.database that throw DatabaseExceptionModifier and TypeMethodDescriptionfinal void
Adds a given 'RowData' object to the table.final void
Adds an array of 'RowData' objects to the table.void
GrantManager.addGrant
(Privileges privs, int object, String param, String grantee, boolean grant_option, String granter) Adds a grant on the given database object.void
GrantManager.addGrantToAllTablesInSchema
(String schema, Privileges privs, String grantee, boolean grant_option, String granter) For all tables in the given schema, this adds the given grant for each of the tables.void
Database.addUserToGroup
(DatabaseQueryContext context, String username, String group) Adds the user to the given group.void
Database.alterUserPassword
(DatabaseQueryContext context, String username, String password) Alters the password of the user but otherwise does not change any information about the user.boolean
Database.canUserAlterTableObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can alter a table or view with the given name, otherwise returns false.boolean
Database.canUserCompactTableObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can compact a table with the given name, otherwise returns false.boolean
Database.canUserCreateAndDropSchema
(DatabaseQueryContext context, User user, String schema) Returns true if the user is permitted to create and drop schema's in the database, otherwise returns false.boolean
Database.canUserCreateAndDropUsers
(DatabaseQueryContext context, User user) Returns true if the user is permitted to create, alter and drop user information from the database, otherwise returns false.boolean
Database.canUserCreateProcedureObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can create a procedure with the given name, otherwise returns false.boolean
Database.canUserCreateSequenceObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can create a sequence with the given name, otherwise returns false.boolean
Database.canUserCreateTableObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can create a table or view with the given name, otherwise returns false.boolean
Database.canUserDeleteFromTableObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can delete from a table or view with the given name and given columns, otherwise returns false.boolean
Database.canUserDropProcedureObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can drop a procedure with the given name, otherwise returns false.boolean
Database.canUserDropSequenceObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can drop a sequence with the given name, otherwise returns false.boolean
Database.canUserDropTableObject
(DatabaseQueryContext context, User user, TableName table) Returns true if the user can drop a table or view with the given name, otherwise returns false.boolean
Database.canUserExecuteStoredProcedure
(DatabaseQueryContext context, User user, String procedure_name) Returns true if the user is allowed to execute the given stored procedure.boolean
Database.canUserInsertIntoTableObject
(DatabaseQueryContext context, User user, TableName table, Variable[] columns) Returns true if the user can insert into a table or view with the given name and given columns, otherwise returns false.boolean
Database.canUserSelectFromTableObject
(DatabaseQueryContext context, User user, TableName table, Variable[] columns) Returns true if the user can select from a table or view with the given name and given columns, otherwise returns false.boolean
Database.canUserShutDown
(DatabaseQueryContext context, User user) Returns true if the user can shut down the database server.boolean
Database.canUserUpdateTableObject
(DatabaseQueryContext context, User user, TableName table, Variable[] columns) Returns true if the user can update a table or view with the given name and given columns, otherwise returns false.void
ConnectionTriggerManager.createTableTrigger
(String schema, String name, int type, TableName on_table, String procedure_name, TObject[] params) Creates a new trigger action on a stored procedure and makes the change to the transaction of this DatabaseConnection.void
Database.createUser
(DatabaseQueryContext context, String username, String password) Creates and adds a new user to this database.void
ProcedureManager.defineJavaProcedure
(ProcedureName procedure_name, String java_specification, TType return_type, TType[] param_types, String username) Defines a Java stored procedure.void
ViewManager.defineView
(ViewDef view, SQLQuery query, User user) Defines a view.int
int
This is the public method for removing a given result set from this table.void
Database.deleteAllUserGroups
(DatabaseQueryContext context, String username) Deletes all the groups the user belongs to.void
ProcedureManager.deleteProcedure
(ProcedureName procedure_name) Deletes the procedure with the given name, or generates an error if the procedure doesn't exist.void
Database.deleteUser
(DatabaseQueryContext context, String username) Deletes the user from the system.boolean
ViewManager.deleteView
(TableName view_name) Deletes the view with the given name, or returns false if no entries were deleted from the view table.void
ConnectionTriggerManager.dropTrigger
(String schema, String name) Drops a trigger that has previously been defined.Executes the procudure and returns the resultant table.Database.getDBProcedure
(String procedure_name, DatabaseConnection connection) Resolves a procedure name into a DBProcedure object.DatabaseProcedure.getReadTables
(DatabaseConnection db) This returns a DataTable[] array that lists the DataTables that are read during this procedure.DatabaseProcedure.getWriteTables
(DatabaseConnection db) Returns a DataTable[] array that lists the DataTables that are written to during this procedure.void
Database.grantHostAccessToUser
(DatabaseQueryContext context, String user, String protocol, String host) Grants the given user access to connect to the database from the given host address.String[]
Database.groupsUserBelongsTo
(DatabaseQueryContext context, String username) Returns the list of all user groups the user belongs to.void
Database.init()
Initializes the database.void
Expression.prepare
(ExpressionPreparer preparer) A general prepare that cascades through the expression and its parents and substitutes an elements that the preparer wants to substitute.Returns the new translated object to be mutated from the given element.void
StatementTree.prepareAllExpressions
(ExpressionPreparer preparer) For each expression in this StatementTree this method will call the 'prepare' method in each expression.void
Assignment.prepareExpressions
(ExpressionPreparer preparer) void
StatementTreeObject.prepareExpressions
(ExpressionPreparer preparer) Prepares all expressions in this statement tree object by passing the ExpressionPreparer object to the 'prepare' method of the expression.void
AbstractFunction.prepareParameters
(ExpressionPreparer preparer) Prepares the parameters of the function.void
Function.prepareParameters
(ExpressionPreparer preparer) Prepares the exressions that are the parameters of this function.void
GrantManager.removeGrant
(Privileges privs, int object, String param, String grantee, boolean grant_option, String granter) Removes a grant on the given object for the given grantee, grant option and granter.DataTableDef.resolveColumnName
(String col_name, boolean ignore_case) Resolves a single column name to its correct form.void
DataTableDef.resolveColumnsInArray
(DatabaseConnection connection, ArrayList list) Given a list of column names referencing entries in this table, this will resolve each one to its correct form.DataIndexSetDef.resolveIndexName
(String index_name, boolean ignore_case) Attempts to resolve the given index name from the index in this table.void
GrantManager.revokeAllGrantsOnObject
(int object, String param) Completely removes all privs granted on the given object for all users.void
GrantManager.revokeAllGrantsOnObject
(int object, String param, String grantee, boolean grant_option, String granter) Removes all privs granted on the given object for the given grantee with the given grant option.void
RowData.setDefaultForRest
(QueryContext context) Any columns in the row of data that haven't been set yet (they will be 'null') will be set to the default value during this method.void
RowData.setupEntire
(int[] col_indices, Expression[] exps, QueryContext context) Sets up an entire row given the array of Expressions and a list of indices to the columns to set.void
RowData.setupEntire
(int[] col_indices, List insert_elements, QueryContext context) Sets up an entire row given the list of insert elements and a list of indices to the columns to set.void
RowData.setupEntire
(Assignment[] assignments, QueryContext context) Sets up an entire row given the array of assignments.void
Database.setupSystemFunctions
(DatabaseConnection connection, String admin_user) Sets all the standard functions and procedures available to engine.void
Database.setUserLock
(DatabaseQueryContext context, User user, boolean lock_status) Sets the lock status for the given user.void
Database.shutdown()
Cleanly shuts down the database.final int
DataTable.update
(QueryContext context, Table table, Assignment[] assign_list, int limit) Updates the table by applying the assignment operations over each row that is found in the input 'table' set.boolean
Database.userBelongsToGroup
(DatabaseQueryContext context, String username, String group) Returns true if the given user belongs to the given group otherwise returns false.boolean
Database.userExists
(DatabaseQueryContext context, String username) Returns true if a user exists in this database, otherwise returns false.GrantManager.userGrantOptions
(int object, String param, String username) Returns all Privileges for the given object for the given grantee (user) that the user is allowed to give grant options for.GrantManager.userGrants
(int object, String param, String username) Returns all Privileges for the given object for the given grantee (user). -
Uses of DatabaseException in com.mckoi.database.interpret
Methods in com.mckoi.database.interpret that throw DatabaseExceptionModifier and TypeMethodDescriptionAlterTable.evaluate()
Call.evaluate()
Compact.evaluate()
CompleteTransaction.evaluate()
CreateTable.evaluate()
CreateTrigger.evaluate()
Delete.evaluate()
DropTable.evaluate()
DropTrigger.evaluate()
Function.evaluate()
Insert.evaluate()
Misc.evaluate()
NoOp.evaluate()
PrivManager.evaluate()
Schema.evaluate()
Select.evaluate()
Evaluates the select statement with the given Database context.Sequence.evaluate()
Set.evaluate()
Show.evaluate()
abstract Table
Statement.evaluate()
Evaluates the statement and returns a table that represents the result set.UpdateTable.evaluate()
UserManager.evaluate()
ViewManager.evaluate()
SQLQueryExecutor.execute
(DatabaseConnection connection, SQLQuery query) Executes the given SQLQuery object on the given DatabaseConnection object.static QueryPlanNode
Planner.formQueryPlan
(DatabaseConnection db, TableSelectExpression expression, com.mckoi.database.interpret.TableExpressionFromSet from_set, ArrayList order_by) Forms a query plan (QueryPlanNode) from the given TableSelectExpression and TableExpressionFromSet.static QueryPlanNode
Planner.planForOrderBy
(QueryPlanNode plan, ArrayList order_by, com.mckoi.database.interpret.TableExpressionFromSet from_set, ArrayList s_col_list) Plans an ORDER BY set.void
AlterTable.prepare()
void
Call.prepare()
void
Compact.prepare()
void
CompleteTransaction.prepare()
void
CreateTable.prepare()
void
CreateTrigger.prepare()
void
Delete.prepare()
void
DropTable.prepare()
void
DropTrigger.prepare()
void
Function.prepare()
void
Insert.prepare()
void
Misc.prepare()
void
NoOp.prepare()
void
PrivManager.prepare()
void
Schema.prepare()
void
SearchExpression.prepare
(ExpressionPreparer preparer) Prepares the expression.void
Select.prepare()
Prepares the select statement with a Database object.void
Sequence.prepare()
void
Set.prepare()
void
Show.prepare()
abstract void
Statement.prepare()
Prepares the statement with the given Database object.void
UpdateTable.prepare()
void
UserManager.prepare()
void
ViewManager.prepare()
void
AlterTableAction.prepareExpressions
(ExpressionPreparer preparer) void
ByColumn.prepareExpressions
(ExpressionPreparer preparer) void
ColumnDef.prepareExpressions
(ExpressionPreparer preparer) void
ConstraintDef.prepareExpressions
(ExpressionPreparer preparer) void
FromClause.prepareExpressions
(ExpressionPreparer preparer) void
FromTableDef.prepareExpressions
(ExpressionPreparer preparer) Prepares the expressions in this table def.void
SearchExpression.prepareExpressions
(ExpressionPreparer preparer) void
SelectColumn.prepareExpressions
(ExpressionPreparer preparer) void
TableSelectExpression.prepareExpressions
(ExpressionPreparer preparer) final void
Statement.resolveTree()
Performs initial preparation on the contents of the StatementTree by resolving all sub queries and mapping functions to their executable forms.