[]
        
(Showing Draft Content)

C1.AdoNet.CSV.C1CSVConnection

C1CSVConnection Class

<xref href="C1.AdoNet.CSV.C1CSVConnection" data-throw-if-not-resolved="false"></xref> represents a connection to a CSV server. 

The connection can be used to query the data hosted by the server or request modifications.

Namespace: C1.AdoNet.CSV
Assembly: C1.AdoNet.CSV.dll
Syntax
public sealed class C1CSVConnection : C1ConnectionBase<C1CSVConnection>, IComponent, IDbConnection, IDisposable, IAsyncDisposable

Constructors

Name Description
C1CSVConnection()

Creates a new C1CSVConnection instance.

C1CSVConnection(C1CSVConnectionStringBuilder)

Initialize a new C1CSVConnection instance using the specified connection string expressed in a C1CSVConnectionStringBuilder.

C1CSVConnection(string)

Initialize a new C1CSVConnection instance using the specified connection string.

Properties

Name Description
ApiConfigFile

The path to the config file for http/https Json source.

ContainsHeaders

A boolean indicating whether the CSV contains headers or not.

DataSource

Gets the name of the database server to which to connect.

Database

Gets the name of the current database after a connection is opened, or the database name specified in the connection string before the connection is opened.

ServerVersion

Gets a string that represents the version of the server to which the object is connected.

TrimValues

A boolean indicating whether to trim the values of fields or not.

Uri

The Uniform Resource Identifier (URI) for the CSV resource location.

Methods

Name Description
BeginDbTransaction(IsolationLevel)

Begins a transaction on the connection.

ChangeDatabase(string)

Changes the current database for an open connection.

Close()

Closes the connection to the database. This is the preferred method of closing any open connection.

CreateDbCommand()

Creates and returns a DbCommand object associated with the current connection.

GetColumnsSchema(string[])

Retrieve the metadata relatively to the columns.

GetPrimaryKeySchema(string[])

Retrieve the metadata relatively to the primary keys.

GetTablesSchema(string[])

Retrieve the metadata relatively to the tables.

OnConnectionStringChanged()

A method that is executed everytime that the connection string used by this C1CSVConnectionStringBuilder has changed.

Open()

Opens a database connection with the settings specified by the connection string.

OpenAsync(CancellationToken)

An asynchronous version of Open() open.