Sequence.Connectors.Sql
0.18.0
dotnet add package Sequence.Connectors.Sql --version 0.18.0
NuGet\Install-Package Sequence.Connectors.Sql -Version 0.18.0
<PackageReference Include="Sequence.Connectors.Sql" Version="0.18.0" />
paket add Sequence.Connectors.Sql --version 0.18.0
#r "nuget: Sequence.Connectors.Sql, 0.18.0"
// Install Sequence.Connectors.Sql as a Cake Addin #addin nuget:?package=Sequence.Connectors.Sql&version=0.18.0 // Install Sequence.Connectors.Sql as a Cake Tool #tool nuget:?package=Sequence.Connectors.Sql&version=0.18.0
Sequence SQL Database Connector
Sequence® is a collection of libraries for automation of cross-application e-discovery and forensic workflows.
The SQL connector contains Steps to:
- Build connection strings
- Create tables
- Insert entities into tables as rows
- Read entities from tables
- Run arbitrary queries
The following flavors of SQL database are supported:
- MariaDb
- MS SQL Server
- MySQL
- Postgres
- SQLite
Creating Tables Using Schemas
Schemas are used to create tables and insert entities.
You can create a Schema from an existing table using SqlCreateSchemaFromTable
The following schema properties are used in creating tables and inserting entities
Property | Description |
---|---|
Name |
Maps to the name of the SQL table. |
AllowExtraProperties |
Must be set to False |
Properties |
Dictionary Mapping column names to column details. |
The following nested properties are also used
Property | Description |
---|---|
Type |
The property type. |
Multiplicity |
Must be either UpToOne for a nullable property or ExactlyOne for a not null property. |
This is an example of declaring a schema
- <Schema> = (
Name: "MyTable"
AllowExtraProperties: False
Properties: (
Id: (
Type: SchemaPropertyType.Integer
Multiplicity: Multiplicity.ExactlyOne
)
Name:(
Type: SchemaPropertyType.String
Multiplicity: Multiplicity.UpToOne
)
)
)
Example
This is an example of a step that drops a table, recreates it, and inserts an entity.
- <ConnectionString> = CreateConnectionString
Server: "Server"
Database: "Database"
UserName: "UserName"
Password: "Password"
- <Schema> = (
Name: "MyTable"
AllowExtraProperties: False
Properties: (
Id: (
Type: SchemaPropertyType.Integer
Multiplicity: Multiplicity.ExactlyOne
)
Name:(
Type: SchemaPropertyType.String
Multiplicity: Multiplicity.UpToOne
)
)
)
- SqlCommand
ConnectionString: <ConnectionString>
Command: "DROP TABLE IF EXISTS MyTable"
DatabaseType: 'SQLite'
- SqlCreateTable
ConnectionString: <ConnectionString>
Schema: <Schema>
DatabaseType: 'SQLite'
- SqlInsert
ConnectionString: <ConnectionString>
Entities: [
(Id: 1 Name:'Name1' )
(Id: 2 Name:'Name2')
]
Schema: <Schema>
DatabaseType: 'SQLite'
Documentation
Download
Try SCL and Core
https://sequence.sh/playground
Package Releases
Can be downloaded from the Releases page.
NuGet Packages
Release nuget packages are available from nuget.org.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
- Microsoft.SqlServer.Management.SqlParser (>= 160.22519.0)
- morelinq (>= 3.3.2)
- MySqlConnector (>= 2.2.0)
- Npgsql (>= 7.0.0)
- Sequence.Core (>= 0.18.0)
- System.Data.SqlClient (>= 4.8.5)
- System.Data.SQLite.Core (>= 1.0.116)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.18.0 | 198 | 11/15/2022 |