DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
Deveel.Data.SystemSchema.PrivilegesTable Class Reference
Inheritance diagram for Deveel.Data.SystemSchema.PrivilegesTable:
Deveel.Data.Sql.Tables.GeneratedTable Deveel.Data.Sql.Tables.ITable Deveel.Data.Sql.IDbObject

Public Member Functions

 PrivilegesTable (ITransaction transaction)
 
override DataObject GetValue (long rowNumber, int columnOffset)
 Gets a single cell within the table that is located at the given column offset and row. More...
 
- Public Member Functions inherited from Deveel.Data.Sql.Tables.GeneratedTable
IEnumerator< RowGetEnumerator ()
 
virtual ColumnIndex GetIndex (int columnOffset)
 Gets an index for given column that can be used to select values from this table. More...
 
void Dispose ()
 

Properties

override TableInfo TableInfo [get]
 
override int RowCount [get]
 
- Properties inherited from Deveel.Data.Sql.Tables.GeneratedTable
IContext Context [get, private set]
 
ObjectName IDbObject. FullName [get]
 
DbObjectType IDbObject. ObjectType [get]
 
abstract TableInfo TableInfo [get]
 
abstract int RowCount [get]
 
- Properties inherited from Deveel.Data.Sql.Tables.ITable
IContext Context [get]
 
TableInfo TableInfo [get]
 Gets the metadata information of the table, used to resolve the column sources. More...
 
int RowCount [get]
 Gets the total number of rows in the table. More...
 
- Properties inherited from Deveel.Data.Sql.IDbObject
ObjectName FullName [get]
 Gets the fully qualified name of the object used to resolve it uniquely within the database. More...
 
DbObjectType ObjectType [get]
 Gets the type of database object that the implementation is for More...
 

Private Member Functions

IList< KeyValuePair< string, int > > FormPrivilegesValues ()
 

Private Attributes

readonly IList< KeyValuePair< string, int > > privBits
 

Additional Inherited Members

- Protected Member Functions inherited from Deveel.Data.Sql.Tables.GeneratedTable
 GeneratedTable (IContext dbContext)
 
DataObject GetColumnValue (int column, ISqlObject obj)
 
virtual void Dispose (bool disposing)
 

Detailed Description

Definition at line 884 of file SystemSchema.cs.

Constructor & Destructor Documentation

Deveel.Data.SystemSchema.PrivilegesTable.PrivilegesTable ( ITransaction  transaction)
inline

Definition at line 887 of file SystemSchema.cs.

888  : base(transaction.Database.Context) {
890  }
readonly IList< KeyValuePair< string, int > > privBits
IDatabase Database
Gets the database this transaction belongs to.
Definition: ITransaction.cs:48
new IDatabaseContext Context
Gets the context that contains this database.
Definition: IDatabase.cs:50
IList< KeyValuePair< string, int > > FormPrivilegesValues()

Member Function Documentation

IList<KeyValuePair<string, int> > Deveel.Data.SystemSchema.PrivilegesTable.FormPrivilegesValues ( )
inlineprivate

Definition at line 892 of file SystemSchema.cs.

892  {
893  var names = Enum.GetNames(typeof (Privileges));
894  var values = Enum.GetValues(typeof (Privileges));
895 
896  return names.Select((t, i) => new KeyValuePair<string, int>(t, (int) values.GetValue(i))).ToList();
897  }
override DataObject Deveel.Data.SystemSchema.PrivilegesTable.GetValue ( long  rowNumber,
int  columnOffset 
)
inlinevirtual

Gets a single cell within the table that is located at the given column offset and row.

Parameters
rowNumberThe unique number of the row where the cell is located.
columnOffsetThe zero-based offset of the column of the cell to return.
Returns
Returns an instance of DataObject that is contained in the cell located by the row and column coordinates provided.
Exceptions
ArgumentOutOfRangeExceptionIf the given columnOffset is less than zero or greater or equal than the number of columns defined in the table metadata.
See also
Tables.TableInfo.IndexOfColumn(string)

Implements Deveel.Data.Sql.Tables.GeneratedTable.

Definition at line 907 of file SystemSchema.cs.

907  {
908  if (rowNumber < 0 || rowNumber >= privBits.Count)
909  throw new ArgumentOutOfRangeException("rowNumber");
910 
911  var pair = privBits[(int) rowNumber];
912  switch (columnOffset) {
913  case 0:
914  return DataObject.Integer(pair.Value);
915  case 1:
916  return DataObject.VarChar(pair.Key);
917  default:
918  throw new ArgumentOutOfRangeException("columnOffset");
919  }
920  }
readonly IList< KeyValuePair< string, int > > privBits

Member Data Documentation

readonly IList<KeyValuePair<string, int> > Deveel.Data.SystemSchema.PrivilegesTable.privBits
private

Definition at line 885 of file SystemSchema.cs.

Property Documentation

override int Deveel.Data.SystemSchema.PrivilegesTable.RowCount
get

Definition at line 903 of file SystemSchema.cs.

override TableInfo Deveel.Data.SystemSchema.PrivilegesTable.TableInfo
get

Definition at line 899 of file SystemSchema.cs.


The documentation for this class was generated from the following file: