dbapi library
Provides a shared interface for communication between higher level ORMs/Query Builders and lower level database implementation
Classes
- AddCollection
- Executing this operation creates a new collection with the given schema
- AddProperty
- Executing this operation adds a property to a collection.
- AlterProperty
- Alter the schema of a specific property in a collection. Only changing the "nullable" or "unique" fields is allowed
- BooleanValue
- Wrapper for bool values
- CollectionSchema
- Schema for a collection
- CombinedFilter
- Represents either a conjunction (AND) or disjunction (OR) of other conditions. Note that those conditions can in turn be CombinedFilter, thus creating a recursive tree structure representing arbitrary condition.
- Connection
- Represents a connection to the database
- Connector
- Top level class, provides a way to connect to the database and a set of supported features.
- Cursor
- These objects represent a database cursor, which is used to manage the context of a fetch operation. Cursors created from the same connection are not isolated, i.e., any changes done to the database by a cursor are immediately visible by the other cursors. Cursors created from different connections can or can not be isolated, depending on how the transaction support is implemented (see also the connection’s .rollback() and .commit() methods).
- DateTimeValue
- Wrapper for DateTime values
- Delete
- Represent a Delete operation.
- Filter
- Base class for filtering
- Insert
- Represent a database insert operation.
-
ListValue<
T extends ValidListValue> - Wrapper for list values
- NotCondition
- Represents the negation (NOT) of the specified condition
- NullValue
- Wrapper for null values
- NumericValue
- Wrapper for numeric values
- Operation
- Base type for describing database operation
- OrderBy
- Clause for query ordering
- Property
- Wrapper class for property name
- PropertySchema
- Schema of a single property
- Query
- Represent a database query.
- RemoveCollection
- Executing this operation remove the collection with the given name
- RemoveProperty
- Executing this operation removes a property from a collection.
- RenameCollection
- Executing this operation renames oldName collection to newName.
- RenameProperty
- Executing this operation renames oldName property to newName.
- RhsValue
- Base class for right-hand-side for user-provided values used in query comparisons.
- SingleFilter
- Represents a single comparison (e.g., age > 18)
- StringValue
- Wrapper for string values
- Upsert
- Describes an "insert or update" operation
- ValidListValue
- Wrapper for items that can be used as type params of ListValue
Enums
- Combinator
- Logical combinators
- DatabaseFeature
- Feature flags for features that a DB may or may not support.
- Operator
- All supported operators
- OrderByDirection
- PropertyType
- Values allowed as property values
Typedefs
-
Entity
= Map<
String, dynamic> - An Entity is the basic type used to transfer data to and from the database. calls to fetch* methods return entities, and write operation take Entities as input.
-
InitFunction
= Future<
void> Function(Connection connection) - Initialization function.
Exceptions / Errors
- DatabaseError
- Exception raised for errors that are related to the database.
- DatabaseException
- Helper class for better toString implementation.
- DataError
- Exception raised for errors that are due to problems with the processed data like division by zero, numeric value out of range, etc.
- Error
- Base class for all other error exceptions.
- IntegrityError
- Exception raised when the data integrity of the database is affected, e.g., a unique constraint check fails.
- InterfaceError
- Exception raised for errors that are related to the database interface rather than the database itself.
- InternalError
- Exception raised when the database encounters an internal error, e.g., the cursor is not valid anymore, the transaction is out of sync, etc.
- NotSupportedError
- Exception raised when a method or database API was used which is not supported by the database.
- OperationalError
- Exception raised for errors that are related to the database's operation and not necessarily under the control of the programmer.
- ProgrammingError
- Exception raised for programming errors, e.g., collection not found or already exists, wrong number of parameters specified, etc.
- Warning
- Exception raised for important warnings like data truncations while inserting, etc.