Documentations
Navigate the RepoDB documentation.
Get Started
| Feature/Class | Description |
|---|---|
| SQL Server | Learn on how to work with SQL Server databases using RepoDB library. |
| Oracle | Learn on how to work with Oracle databases using RepoDB library. |
| PostgreSQL | Learn on how to work with PostgreSQL databases using RepoDB library. |
| MySQL | Learn on how to work with MySQL databases using RepoDB library. |
| Db2 | Learn on how to work with IBM Db2 databases using RepoDB library. |
| SQLite | Learn on how to work with SQLite databases using RepoDB library. |
| Telemetry | Learn on how to start capturing and publishing RepoDB operation telemetry using RepoDb.Telemetry.Default. |
Features
| Feature/Class | Description |
|---|---|
| Batch Operations | It is the process of making the multiple single-operations be executed against the database in one-go. |
| Bulk Operations | It is the process of bringing all the data from the application into the database server at once, and at the same time, ignoring some database specific activities behind the scene. Thus gives you maximum performance during the operation. |
| Caching | In general terms, a Cache is a component that stores an object (or its states) in any form of temporary storage that is accessible for future used. The object that is being stored can be a result of computational, operational, inputs/outputs or analytical operations and calculations. |
| Class Handlers | This is a feature that would allow you to handle the event during the serialization/deserialization process of the Model and the DbDataReader object (inbound/outbound). |
| Class Mapping | This is a feature that would allow you to map the .NET CLR type (or class properties) into its equivalent database objects and types. |
| Connection Persistency | This is a feature that enables you to manage the instance of the database connection object within the repository objects. |
| Dynamics | This feature allows you to work with RepoDB by maximizing the usage of dynamics. |
| Enumeration | This is a feature that enables you to work with enumerations within the class objects. |
| Expression Trees | This is a feature that would allow you to compose a conditional expressions (to filter a data) when doing an operation in the database. |
| Hints | This is a feature that would allow you to optimize the command executions towards the database. It is a keyword that is usually being added into the SQL statements (DML) to further optimize the execution of your commands. |
| Implicit Mapping | This is a feature that would allow you to implicitly map the .NET CLR objects or class properties into its equivalent object in the database. Certain mapper classes has been provided in order to avoid the usage of the attributes in the classes. |
| Multiple Query | This is a feature that would allow you to fetch multiple resultsets in a single call. |
| Property Handlers | This is a feature that would allow you to handle the tranformation of the class properties and database columns (inbound/outbound). |
| Repositories | A repository is a software design pattern and practice in which it is being implemented as an additional layer between your application and your database. It is being represented as a class object within the application. Through repository, you are managing how the data is being manipulated from/to the database. |
| Targeted Operations | This feature allows you to make a targeted invocation when executing the operations againts the database. |
| Telemetry | A feature that captures per-operation execution telemetry (SQL statement, elapsed time, session, client, source assembly) via an ITrace-based pipeline and publishes it to an insights collector. |
| Tracing | This is a feature that would allow you to log, audit and debug the command execution context (i.e.: SQL Statement, Parameters, Elapsed Time) via TraceLog class. |
| Transaction | A process of making the executions more ACID in nature. |
| Type Mapping | This is a feature that would allow you to map the .NET CLR type into its equivalent database type. |
Operations
| Feature/Class | Description |
|---|---|
| Average | This method computes the average value of the target field. |
| AverageAll | This method computes the average value of the target field across all rows. |
| BatchQuery | This method queries rows from the database in batches. |
| BulkDelete | This method deletes rows from the database in bulk. It is supported for SQL Server and Oracle. Oracle also has a dedicated BulkDeleteByKey operation for deleting by primary key. |
| BulkInsert | This method inserts all rows from the client application into the database in bulk. It is supported for SQL Server and Oracle. |
| BulkMerge | This method merges all rows from the client application into the database in bulk. It is supported for SQL Server and Oracle. |
| BulkUpdate | This method updates all rows from the client application in the database in bulk. It is supported for SQL Server and Oracle. |
| Count | This method counts the number of rows in a table. |
| CountAll | This method counts all rows in a table. |
| Delete | This method deletes rows from a table. |
| DeleteAll | This method deletes all rows, or a specified set of rows by primary key, from a table. |
| ExecuteNonQuery | This method executes a raw SQL statement directly against the database and returns the number of rows affected. It supports all RDBMS data providers. |
| ExecuteQuery | This method executes a raw SQL statement directly against the database and returns an IEnumerable object. It supports all RDBMS data providers. |
| ExecuteQueryMultiple | This method executes multiple raw SQL statements against the database in a single round-trip and returns a QueryMultipleExtractor object. It supports all RDBMS data providers. |
| ExecuteReader | This method executes a raw SQL statement directly against the database and returns a DbDataReader object. It supports all RDBMS data providers. |
| ExecuteScalar | This method executes a raw SQL statement directly against the database and returns the value of the first column of the first row from the result set. It supports all RDBMS data providers. |
| Exists | This method checks whether matching rows exist in a table. |
| Insert | This method inserts a data entity object as a new row in the table. |
| InsertAll | This method inserts multiple data entity objects as new rows in the table. |
| Max | This method computes the maximum value of the target field. |
| MaxAll | This method computes the maximum value of the target field across all rows. |
| Merge | This method inserts a new row or updates an existing row in the table. It operates as an UPSERT and does not perform any deletion. |
| MergeAll | This method inserts multiple data entity objects as new rows or updates existing rows in the table. It operates as an UPSERT and does not perform any deletion. |
| Min | This method computes the minimum value of the target field. |
| MinAll | This method computes the minimum value of the target field across all rows. |
| Query | This method queries rows from a table. |
| QueryAll | This method queries all rows from a table. |
| QueryMultiple | This method queries data as multiple result sets from the table based on the given target types. |
| Sum | This method computes the sum of the target field. |
| SumAll | This method computes the sum of the target field across all rows. |
| Truncate | This method truncates a table in the database. |
| Update | Updates an existing row in the table. |
| UpdateAll | Updates multiple existing rows in the table in a single call. |
Classes
| Feature/Class | Description |
|---|---|
| BaseDbSetting | A base class for all the database setting classes. |
| BaseRepository | A base class that is being used to implement an entity-based repositories. |
| BaseStatementBuilder | A base class for all the statement builder classes. |
| BulkInsertMapItem | A mapping class that is being used for bulk insert operation. |
| CacheItem | A class that is used as an item for the cache object. |
| CancellableTraceLog | A class that is being used to cancel the current trace operation. |
| ClassExpression | A helper class to extract class properties and values. |
| ClassProperty | A container class that holds an instance of property object. It also contains all the necesarry methods that is relevant to the current property object. |
| Constant | A constant class that is being used by the library. |
| Converter | A converter class that is being used to convert an object into a specific type within the library. |
| DataEntityDataReader | A customized data reader class that is being used to handle the list of data entity objects. |
| DataReader (Compiled) | The most fastest data reader extractor in .NET. It is used to extract the content of the data reader object and map it into a class object. |
| DbField | A class that contains the necessary properties that defines a database field. |
| DbRepository | A base class that is being used to implement a repository object. This is very useful if you would like to develop a shared or database level repository. |
| DirectionalQueryField | A class that is being used to define a query expression for the SQL statement that is bi-directional. |
| EntityMapFluentDefinition | A class that is being used to define a data entity level mappings (i.e.: Table, Column, Primary, Identity, DB Type and Class/Property Handler). |
| Field | A class that defines a context of field object. |
| FunctionalQueryField | A query field class that is being used to define a functional query expression for the SQL statement that is useful for customizations. |
| GlobalConfiguration | A class that is being used to define the globalized configurations for the library. |
| LeftQueryField | A query field class that is being used to define a query expression for the SQL statement using the LEFT function. |
| LeftTrimQueryField | A query field class that is being used to define a query expression for the SQL statement using the LTRIM function. |
| LenQueryField | A query field class that is being used to define a query expression for the SQL statement using the LEN function. |
| LengthQueryField | A query field class that is being used to define a query expression for the SQL statement using the LENGTH function. |
| LowerQueryField | A query field class that is being used to define a query expression for the SQL statement using the LOWER function. |
| MemoryCache | An advance class that is being used to cache an object into a memory within the library. |
| OracleBulkInsertMapItem | A mapping class used to define a column mapping, with an optional explicit OracleDbType, for the Oracle bulk operations. |
| OrderField | A class that is being used to define an ordering of the results when querying a data from the database. |
| Parameter | A class that defines a parameter of the data command object. |
| PostgreSqlBulkInsertMapItem | A mapping class used to define a column mapping, with an optional explicit NpgsqlDbType or data type name, for the PostgreSQL bulk operations. |
| PropertyValue | A class that holds the value of class or data entity property and its values. |
| QueryBuilder | An advance fluent class that is being used to construct a SQL statements all throughout the library. |
| QueryField | A class that is being used to define a query expression for the SQL statement. You can define the name, operation and the value of the target expression. |
| QueryGroup | A class that is being used to group a list of query expressions for the SQL statement. You can define the conjunction to be used during the multiple query expressions. |
| QueryMultipleExtractor | A class that is being used to extract the information of the multiple resultsets returned by the ExecuteQueryMultiple operation. |
| ResultTraceLog | A class that handles the result of the trace operation. |
| RightQueryField | A query field class that is being used to define a query expression for the SQL statement using the RIGHT function. |
| RightTrimQueryField | A query field class that is being used to define a query expression for the SQL statement using the RTRIM function. |
| SqlServerBulkInsertMapItem | A mapping class used to define a column mapping for the SQL Server bulk operations. |
| SqlServerTableHints | A class that contains all the SQL Server table optimizers. |
| TraceLog | A class that contains all the information of the trace. |
| TrimQueryField | A query field class that is being used to define a query expression for the SQL statement using the TRIM function. |
| TypeMapFluentDefinition | A class that is being used to define a type-level mappings (i.e.: DB Type and Property Handler). |
| UpperQueryField | A query field class that is being used to define a query expression for the SQL statement using the UPPER function. |
Attributes
| Feature/Class | Description |
|---|---|
| ArrayLength (Db2) | This attribute sets the DB2Parameter.ArrayLength property value via a class property. |
| CompareInfo (SQL Server) | This attribute sets the SqlParameter.CompareInfo property value via a class property. |
| ConvertedValue (PostgreSQL) | This attribute sets the NpgsqlParameter.ConvertedValue property value via a class property. |
| DataTypeName (PostgreSQL) | This attribute sets the NpgsqlParameter.DataTypeName property value via a class property. |
| Db2Type (Db2) | This attribute sets the DB2Parameter.DB2Type property value via a class property. |
| Db2TypeOutput (Db2) | This attribute sets the DB2Parameter.DB2TypeOutput property value via a class property. |
| DbType | This attribute sets the DbParameter.DbType property value via a class property. |
| Direction | This attribute sets the DbParameter.Direction property value via a class property. |
| ForceColumnEncryption (SQL Server) | This attribute sets the SqlParameter.ForceColumnEncryption property value via a class property. |
| Identity | Marks a class property as the identity column of the database table. |
| IsDefault (Db2) | This attribute sets the DB2Parameter.IsDefault property value via a class property. |
| IsNullable | This attribute sets the DbParameter.IsNullable property value via a class property. |
| IsUnassigned (Db2) | This attribute sets the DB2Parameter.IsUnassigned property value via a class property. |
| LocaleId (SQL Server) | This attribute sets the SqlParameter.LocaleId property value via a class property. |
| Map | Maps a class or class property into its equivalent database object (table, view, or column) name. |
| MySqlDbType (MySql.Data) | This attribute sets the MySqlParameter.MySqlDbType property value via a class property. |
| MySqlDbType (MySqlConnector) | This attribute sets the MySqlParameter.MySqlDbType property value via a class property. |
| Name | This attribute sets the DbParameter.Name property value via a class property. |
| NpgsqlDbType (PostgreSQL) | This attribute sets the NpgsqlParameter.NpgsqlDbType property value via a class property. |
| Offset (SQL Server) | This attribute sets the SqlParameter.Offset property value via a class property. |
| Precision | This attribute sets the DbParameter.Precision property value via a class property. |
| Primary | Marks a class property as the primary key of the database table. |
| PropertyHandler | Attaches a property handler to a class property to transform its value during data extraction and command execution. |
| PropertyValueAttribute | The base class for all attributes that set properties on a DbParameter object. |
| Scale | This attribute sets the DbParameter.Scale property value via a class property. |
| Size | This attribute sets the DbParameter.Size property value via a class property. |
| SourceColumn (Db2) | This attribute sets the DB2Parameter.SourceColumn property value via a class property. |
| SourceColumnNullMapping (Db2) | This attribute sets the DB2Parameter.SourceColumnNullMapping property value via a class property. |
| SourceVersion (Db2) | This attribute sets the DB2Parameter.SourceVersion property value via a class property. |
| SqlDbType (SQL Server) | This attribute sets the SqlParameter.SqlDbType property value via a class property. |
| SqliteType (SQLite) | This attribute sets the SqliteParameter.SqliteType property value via a class property. |
| TypeMap | Maps a class property into a specific database type (e.g. DbType). |
| TypeName (SQL Server) | This attribute sets the SqlParameter.TypeName property value via a class property. |
| UdtTypeName (SQL Server) | This attribute sets the SqlParameter.UdtTypeName property value via a class property. |
| XmlSchemaCollectionDatabase (SQL Server) | This attribute sets the SqlParameter.XmlSchemaCollectionDatabase property value via a class property. |
| XmlSchemaCollectionName (SQL Server) | This attribute sets the SqlParameter.XmlSchemaCollectionName property value via a class property. |
| XmlSchemaCollectionOwningSchema (SQL Server) | This attribute sets the SqlParameter.XmlSchemaCollectionOwningSchema property value via a class property. |
Enumerations
| Feature/Class | Description |
|---|---|
| Conjunction | A enumeration that defines the conjunctions to be used when composing a query expression. |
| ConnectionPersistency | A enumeration that defines the persistency of the database connection object when working with repository. |
| ConversionType | A enumeration that defines the type of conversion to be used when extracting a data from/to the database. |
| KeyColumnReturnBehavior | A enumeration that defines the type of conversion to be used when extracting a data from/to the database. |
| Operation | A enumeration that defines the different operations that can be used when composing a query expression. |
| Order | A enumeration that defines the list of ordering when querying a data from the database. |
| PostgreSqlBulkImportIdentityBehavior | An enumeration that is being used to define the behavior of the identity property/column when an entity is being bulk-imported towards the target table. |
| PostgreSqlBulkImportMergeCommandType | A enumeration that is being used to define the command text to use when executing the BulkMerge operation. |
| PostgreSqlBulkImportPseudoTableType | An enumeration that is being used to define the type of pseudo-temporary table to be created during the bulk-import operations. |
Interfaces
| Feature/Class | Description |
|---|---|
| ICache | This interface is used to mark a class to be a cache object. It gives you the full control on the implementations of your own cache object (i.e.: File Caching, SqLite Caching, XML Caching, Memory Caching, etc). |
| IDbHelper | This interface is used to mark a class to be a database helper object. It is very useful if you would like optimize and override the default implementation of the library (i.e.: retrieving the list of fields, retrieving newly generated identity). |
| IDbSetting | This interface is used to mark a class to be a database setting object. It allows you to control the behavior of the library on a specific RDBMS data provider based on the value you provided on the properties this class. |
| IExpirable | This interface is used to make a class expirable in a contextual point of view. Is is used by CacheItem class. |
| IPropertyHandler | This interface marks a class as a property handler. It exposes TInput and TResult generic type parameters used by both the Get() and Set() methods. |
| IResolver | This interface is used to mark a class to be a resolver object. This interface accepts upto the maximum 7 input generic types and 1 output generic type. |
| IStatementBuilder | This interface is used to mark a class to be a statement builder object. I provides necessary methods for your to be able to override the way how the SQL statements are being constructed. |
| ITrace | This interface is used to mark a class to be a trace object. |
Cachers
| Feature/Class | Description |
|---|---|
| ClassMappedNameCache | A class that is being used to retrieve the cached name of the class or data entity. |
| CommandTextCache | A class that is being used to retrieve the cached command texts within RepoDB library. |
| DbFieldCache | A class that is being used to retrieve the cached database fields of the class or data entity. |
| FieldCache | A class that is being used to retrieve the cached fields or properties of the class or data entity. |
| IdentityCache | A class that is being used to retrieve the cached identity field of the class or data entity. |
| PrimaryCache | A class that is being used to retrieve the cached primary field of the class or data entity. |
| PropertyCache | A class that is being used to retrieve the cached properties of the class or data entity. |
| PropertyHandlerCache | A class that is being used to retrieve the cached property handler of the class or data entity property. |
| PropertyMappedNameCache | A class that is being used to retrieve the cached name of the class or data entity property. |
| PropertyValueAttributeCache | A class that is being used to retrieve the cached attributes of the property. |
| TypeMapCache | A class that is being used to retrieve the cached mapped database type of the class or data entity property. |
Mappers
| Feature/Class | Description |
|---|---|
| ClassMapper | A mapper class that is being used to map the class into its equivalent object in the database (i.e.: Table, View). This class is used as an alternative to Map attribute. |
| ClassHandlerMapper | A class that is being used to map a class handler into a class. This class is used as an alternative to ClassHandler attribute. |
| DbHelperMapper | A mapper class for all the database helper classes. The mapping can be made based on the type of the target RDBMS data provider. |
| DbSettingMapper | A mapper class for all the database setting classes. The mapping can be made based on the type of the target RDBMS data provider. |
| FluentMapper | A class that is being used to define a mapping for the target data entity in a fluent way. |
| IdentityMapper | A mapper class that is being used to map a class property to be an identity property. This class is used as an alternative to Identity attribute. |
| PrimaryMapper | A mapper class that is being used to map a class property to be primary property. This class is used as an alternative to Primary attribute. |
| PropertyMapper | A mapper class that is being used to map the class property into its equivalent column in the database. This class is used as an alternative to Map attribute. |
| PropertyHandlerMapper | A class that is being used to map a property handler into a .NET CLR type or a class property. This class is used as an alternative to PropertyHandler attribute. |
| PropertyValueAttributeMapper | A mapper class that is being used to map the list PropertyValueAttribute objects into a class property. This class is used as an alternative to the PropertyValueAttribute attributes. |
| StatementBuilderMapper | A mapper class for all the statement builder classes. The mapping can be made based on the type of the target RDBMS data provider. |
| TypeMapper | A class that is being used to map a .NET CLR type or class property into its equivalent database type. This class is used as an alternative to TypeMap attribute. |