NFX.DataAccess.CRUD NamespaceNFX Class Library

[This is preliminary documentation and is subject to change.]

Facilitates working with SQL and NoSQL backends on the level of records, rowsets, tables and queries
Classes

  ClassDescription
Public classAmorphousDynamicRow
Represents a row of data which has a schema only known at run-time that also implements IAmorphousData interface that allows this row to store "extra" data that does not comply with the current schema. Dynamic rows store data in object[] internally, providing better flexibility(ability to define schema at runtime) than TypedRows at the expense of performance. This class is not sealed so implementors may override configuration persistence
Public classAmorphousTypedRow
Represents a type-safe row of data when schema is known at compile-time that also implements IAmorphousData interface that allows this row to store "extra" data that does not comply with the current schema. Typed rows store data in instance fields, providing better performance and schema definition compile-time checking than DynamicRows at the expense of inability to define schema at runtime
Public classCRUDException
Thrown by CRUD data access classes
Public classCRUDFieldValidationException
Thrown by CRUD data access classes when field validation does not pass
Public classCRUDOperationCallContext
Establishes a thead-static context which surrounds CRUD operations. You can derive your own classes, the .ctor must be chained. The context can be nested. A call to .ctor must be balanced with .Dispose(). This is needed to pass some out-of-band information in some special cases to CRUD operations without changing the caller interface, i.e. to swap database connection string. This class IS NOT THREAD SAFE, so in cases of async operations, the context captures extra parameters ONLY for initial ASYNC INVOCATION, that is- a true ASYNC implementation must pass the reference along the task execution line (in which case the object may be already Disposed but usable for property access
Public classCRUDQueryHandler
Represents an entity that can execute a query. The implementation may be called by multiple threads and must be safe
Public classCRUDQueryHandler TStore 
Represents an entity that can execute a query. The implementation may be called by multiple threads and must be safe
Public classCRUDRowValidationException
Thrown by CRUD data access classes when field validation does not pass
Public classCRUDTransaction
Represents an abstract base for CRUDTransactions that perform particular backend CRUD work in overriden classes
Public classCRUDValidationException
Thrown by CRUD data access classes when validation does not pass
Public classCursor
Represents a buffer-less unidicrectional reader that binds IEnumerable(Row) and the backend resource (such as SQLReader or other object which is internal to the backend). The cursor is NOT thread-safe and must be disposed properly by closing all resources associated with it. Only one iteration (one call to GetEnumerator) is possible
Protected classCursor enumerator
Public classDynamicRow
Represents a row of data which has a schema only known at run-time. Dynamic rows store data in object[] internally, providing better flexibility(ability to define schema at runtime) than TypedRows at the expense of performance. This class is not sealed so implementors may override configuration persistence
Public classFieldAttribute
Provides information about table schema that this typed row is a part of
Public classFormModel
Represents a "model" (in MVC terms) of a data-entry form. Form models are statically typed - contain fields and can contain "extra amorphous" data
Public classJSONMappings
Facilitates mapping of CRUD/CLR types/values to JSON and back to CLR/CRUD
Public classNotImplementedCRUDDataStore
Public classQuery
Defines a query sent into ICRUDDataStore implementor to retrieve data. A Query is a named bag of paremeters where every parameter has a name and the value.
Public classQuery Param
Represents a CRUD query parameter
Public classQuery TResultRow 
Generic version of Query
Public classQueryResolver
Infrastructure class - not for app developers. Resolves Query objects into query handlers. Query names are case-insensitive. This class is thread-safe
Public classQuerySource
Represents query source code with pre-processed pragmas
Public classQuerySource ColumnDef
Provides column definition in QuerySource
Public classRow
Base class for any CRUD row. This class has two direct subtypes - DynamicRow and TypedRow. Rows are NOT THREAD SAFE by definition
Public classRowEqualityComparer
Checks for reference equality. Use RowEqualityComparer.Instance
Public classRowset
Implements a rowset that supports row change logging and CRUD operations. Rowsets are not optimal for data replication as they perform linear search which is slow, however Rowset class supports sorting. In contrast, Tables are kind of rowsets that keep data pre-sorted by key thus facilitating quick searching
Public classRowsetBase
Provides base for rowset implementation. Rowsets are mutable lists of rows where all rows must have the same schema, however a rowset may contain a mix of dynamic and typed rows as long as they have the same schema. Rowsets are not thread-safe
Public classSchema
Describes a schema for rows: TypedRows and DynamicRows. DynamicRows are "shaped" in memory from schema, whereas, TypedRows define schema. Schema for Typedrows is cached in static dictionary for speed
Public classSchema FieldDef
Provides a definition for a single field of a row
Public classTable
Implements a master table. Tables are rowsets that are pre-sorted by keys. They are used in scenarios when in-memory data replication is needed. A table supports efficient FindKey() operation but does not support sorting. This class is not thread-safe.
Public classTableAttribute
Provides information about table schema that this row is a part of
Public classTargetedAttribute
Provides a base for attributes which ar targeted for particular techlology (i.e. "ORACLE")
Public classTypedRow
Represents a type-safe row of data when schema is known at compile-time. Typed rows store data in instance fields, providing better performance and schema definition compile-time checking than DynamicRows at the expense of inability to define schema at runtime
Public classUniqueSequenceAttribute
Provides information for unique sequence gen: scope and name
Structures

  StructureDescription
Public structureCacheParams
Implements ICacheParams - supplied caching parameters
Protected structureiListReadOnly
Public structureRowChange
Describes row modification
Interfaces

  InterfaceDescription
Public interfaceIAmorphousData
Denotes an entity, which is typically a row-derivative, that has extra data fields that are not defined by particular schema and get represented as {name:value} map instead (schema-less data). This interface is usually implemented by rows that support version changing between releases, i.e. when structured storage (such as Mongo DB) stores more fields than are currently declared in the row the extra fields will be placed in the AmorphousData collection. This interface also provides hook BeforeSave()/AfterLoad() that allow for transforms between Amorphous and "hard-schema" data models
Public interfaceICacheParams
Supplies caching params
Public interfaceICRUDDataStore
Represents a DataStore that supports CRUD operations
Public interfaceICRUDDataStoreImplementation
Public interfaceICRUDOperations
Describes an entity that performs single (not in transaction/batch)CRUD operations
Public interfaceICRUDQueryExecutionContext
Represents a context (such as Sql Server connection + transaction scope, or Hadoop connect string etc.) for query execution. This is a marker interface implemented by particular providers
Public interfaceICRUDQueryResolver
Represents a class that resolves Query into suitable handler that can execute it
Public interfaceICRUDTransactionOperations
Describes an entity that performs single (not in transaction/batch)CRUD operations
Public interfaceIValidatable
Denotes an entity that supports validation
Delegates

  DelegateDescription
Public delegateFieldFilterFunc
Provides filter predicate for CRUD operations. Return true to include the specified field
Public delegateSetFieldFunc
Injects function that tries to set field value. May elect to skip the set and return false to indicate failure(instead of throwing exception)
Enumerations

  EnumerationDescription
Public enumerationCRUDDataStoreType
Denotes types of CRUD stores
Public enumerationDataKind
Provides hint/classification for field textual data
Public enumerationFormMode
Denotes form modes: unspecified | insert | edit
Public enumerationRowChangeType
Describes what kind of modification was done
Public enumerationTransactionDisposeBehavior
Specifies how transaction scope behaves on scope exit
Public enumerationTransactionStatus
Denotes transaction statuses