This package contains the basic data-types for representing relations in NanoDB. Relations can be many different things - tables, views, external tables, or results of subqueries in a particular SQL query, for example. All of the common classes are in this package.
Type InformationOne of the major aspects of this package is the collection of classes that represent type information in the database. The classes are as follows:
Data-types are defined by the
SQLDataTypeenumeration, which contains both the enumerated types and predefined type-ID byte-values.
Column-types are defined by the
ColumnTypeclass, which contains the SQL data-type for the column (using the
SQLDataTypeenum), and any additional information about the column's type that might need to be specified. For example, a
CHAR(100)column has a base-type of
SQLDataType.CHAR, but it must also specify its length as 100 characters. This additional information is also included in the
Interface Summary Interface Description TupleThis interface provides the operations that can be performed with a tuple.
Class Summary Class Description ColumnInfoBasic information about a table column, including its name and SQL type. ColumnRefsThis class represents a set of columns in a schema by specifying the indexes of the columns in the set. ColumnTypeThe type of a single column in a relation. DatabaseConstraintEnforcerThis class enforces all database constraints on the database schema, including NOT NULL constraints, primary key/unique constraints, and foreign key constraints. ForeignKeyColumnRefsThis class represents a foreign key constraint between two tables in the database. IndexColumnRefsThis class records that there is an index built on a particular set of columns. KeyColumnRefsThis class represents a primary key or other unique key, specifying the indexes of the columns in the key. SchemaA schema is an ordered collection of column names and associated types. Schema.IndexedColumnInfoThis helper class is used for the internal hashed column structure, so that we can do fast lookups based on table names and column names. TableInfoThis class represents a single table in the database, including the table's name, and the tuple file that holds the table's data. TableUtilsCreated by donnie on 7/16/17. TupleUtils
Enum Summary Enum Description ForeignKeyValueChangeOptionAn enumeration specifying the options allowed for ON DELETE and ON UPDATE actions for foreign keys. JoinTypeAn enumeration specifying the different types of join operation. SQLDataTypeAn enumeration of the SQL data-types that are supported by NanoDB. TableConstraintTypeAn enumeration specifying the constraint types allowed on tables.
Exception Summary Exception Description ConstraintViolationExceptionThis exception is used to signal when a database constraint is violated. SchemaNameExceptionThis exception is thrown when there are any schema name issues, such as duplicate column names, duplicate table names, ambiguous or invalid names, and so forth.