Package | Description |
---|---|
com.mckoi.database |
The core database classes for Mckoi.
|
com.mckoi.database.interpret |
Modifier and Type | Class and Description |
---|---|
class |
UserAccessException
An exception that is thrown when the user is not permitted to perform a
certain action.
|
Modifier and Type | Method and Description |
---|---|
void |
DataTable.add(RowData row_data)
Adds a given 'RowData' object to the table.
|
void |
DataTable.add(RowData[] row_data_arr)
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 |
DataTable.delete(Table table) |
int |
DataTable.delete(Table table,
int limit)
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.
|
Table |
DatabaseProcedure.execute(User user,
Object[] args)
Executes the procudure and returns the resultant table.
|
DatabaseProcedure |
Database.getDBProcedure(String procedure_name,
DatabaseConnection connection)
Resolves a procedure name into a DBProcedure object.
|
DataTable[] |
DatabaseProcedure.getReadTables(DatabaseConnection db)
This returns a DataTable[] array that lists the DataTables that are read
during this procedure.
|
DataTable[] |
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.
|
Object |
ExpressionPreparer.prepare(Object element)
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 |
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 |
Assignment.prepareExpressions(ExpressionPreparer preparer) |
void |
Function.prepareParameters(ExpressionPreparer preparer)
Prepares the exressions that are the parameters of this function.
|
void |
AbstractFunction.prepareParameters(ExpressionPreparer preparer)
Prepares the parameters of the 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.
|
String |
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.
|
String |
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(Assignment[] assignments,
QueryContext context)
Sets up an entire row given the array of assignments.
|
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 |
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.
|
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.
|
Privileges |
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.
|
Privileges |
GrantManager.userGrants(int object,
String param,
String username)
Returns all Privileges for the given object for the given grantee (user).
|
Modifier and Type | Method and Description |
---|---|
Table |
CreateTable.evaluate() |
Table |
Function.evaluate() |
Table |
CompleteTransaction.evaluate() |
Table |
Select.evaluate()
Evaluates the select statement with the given Database context.
|
Table |
CreateTrigger.evaluate() |
Table |
NoOp.evaluate() |
Table |
DropTable.evaluate() |
Table |
Compact.evaluate() |
Table |
ViewManager.evaluate() |
Table |
Show.evaluate() |
Table |
Schema.evaluate() |
Table |
UpdateTable.evaluate() |
Table |
Call.evaluate() |
Table |
AlterTable.evaluate() |
Table |
Delete.evaluate() |
abstract Table |
Statement.evaluate()
Evaluates the statement and returns a table that represents the result
set.
|
Table |
Misc.evaluate() |
Table |
PrivManager.evaluate() |
Table |
DropTrigger.evaluate() |
Table |
Sequence.evaluate() |
Table |
UserManager.evaluate() |
Table |
Set.evaluate() |
Table |
Insert.evaluate() |
Table |
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 |
CreateTable.prepare() |
void |
Function.prepare() |
void |
CompleteTransaction.prepare() |
void |
Select.prepare()
Prepares the select statement with a Database object.
|
void |
CreateTrigger.prepare() |
void |
NoOp.prepare() |
void |
DropTable.prepare() |
void |
Compact.prepare() |
void |
ViewManager.prepare() |
void |
Show.prepare() |
void |
Schema.prepare() |
void |
UpdateTable.prepare() |
void |
Call.prepare() |
void |
AlterTable.prepare() |
void |
Delete.prepare() |
abstract void |
Statement.prepare()
Prepares the statement with the given Database object.
|
void |
Misc.prepare() |
void |
PrivManager.prepare() |
void |
DropTrigger.prepare() |
void |
Sequence.prepare() |
void |
UserManager.prepare() |
void |
Set.prepare() |
void |
Insert.prepare() |
void |
SearchExpression.prepare(ExpressionPreparer preparer)
Prepares the expression.
|
void |
AlterTableAction.prepareExpressions(ExpressionPreparer preparer) |
void |
ByColumn.prepareExpressions(ExpressionPreparer preparer) |
void |
SelectColumn.prepareExpressions(ExpressionPreparer preparer) |
void |
FromClause.prepareExpressions(ExpressionPreparer preparer) |
void |
ConstraintDef.prepareExpressions(ExpressionPreparer preparer) |
void |
SearchExpression.prepareExpressions(ExpressionPreparer preparer) |
void |
ColumnDef.prepareExpressions(ExpressionPreparer preparer) |
void |
TableSelectExpression.prepareExpressions(ExpressionPreparer preparer) |
void |
FromTableDef.prepareExpressions(ExpressionPreparer preparer)
Prepares the expressions in this table def.
|
void |
Statement.resolveTree()
Performs initial preparation on the contents of the StatementTree by
resolving all sub queries and mapping functions to their executable
forms.
|
Copyright © 2015. All rights reserved.