• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class Postgres

Allows in/out operations and/or data validations with a PostgreSQL instance.

Inheritance
System.Object
AutoCheck.Core.Connector
Postgres
Odoo
Implements
System.IDisposable
Inherited Members
AutoCheck.Core.Connector.CurrentOS
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoCheck.Core.Connectors
Assembly: AutoCheck.dll
Syntax
public class Postgres : Connector, IDisposable

Constructors

| Improve this Doc View Source

Postgres(String, String, String, String, String)

Creates a new connector instance.

Declaration
public Postgres(string host, string database, string username, string password = null, string binPath = "C:\\Program Files\\PostgreSQL\\10\\bin")
Parameters
Type Name Description
System.String host

Host address in order to connect with the running PostgreSQL service.

System.String database

The PostgreSQL database name.

System.String username

The PostgreSQL database username, which will be used to perform operations.

System.String password

The PostgreSQL database password, which will be used to perform operations.

System.String binPath

The path to the bin folder [only needed for windows systems].

Properties

| Improve this Doc View Source

BinPath

The path to the bin folder [only needed for windows systems].

Declaration
public string BinPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Conn

The connection used for communication between PostgreSQL and the current application.

Declaration
public NpgsqlConnection Conn { get; }
Property Value
Type Description
Npgsql.NpgsqlConnection
| Improve this Doc View Source

Database

The PostgreSQL database host address, with a running instance allowing remote connections.

Declaration
public string Database { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Host

PostgreSQL host address.

Declaration
public string Host { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Password

The PostgreSQL database password, which will be used to perform operations.

Declaration
protected string Password { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Student

The student name wich is the original database creator.

Declaration
public string Student { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

User

The PostgreSQL database username, which will be used to perform operations.

Declaration
public string User { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

CompareSelects(String, String)

Compares two select queries, executing them and comparing the exact amount of rows and its data (doesn't compare the column names).

Declaration
public bool CompareSelects(string expected, string compared)
Parameters
Type Name Description
System.String expected

The left-side select query.

System.String compared

The right-side select query.

Returns
Type Description
System.Boolean

True if both select queries are equivalent (returns exactly the same rows).

| Improve this Doc View Source

CountRegisters(Postgres.Source)

Counts how many registers appears in a table.

Declaration
public long CountRegisters(Postgres.Source source)
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

Returns
Type Description
System.Int64

Amount of registers found.

| Improve this Doc View Source

CountRegisters(Postgres.Source, Postgres.Filter)

Counts how many registers appears in a table.

Declaration
public long CountRegisters(Postgres.Source source, Postgres.Filter filter)
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

Postgres.Filter filter

A filter over a single field which will be used to screen the data, subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

Returns
Type Description
System.Int64

Amount of registers found.

| Improve this Doc View Source

CountRegisters(String, String)

Counts how many registers appears in a table.

Declaration
public long CountRegisters(string source, string filter = null)
Parameters
Type Name Description
System.String source

The set of schemas and tables from which the data will be loaded, should be an SQL FROM sentence (without FROM) allowing joins and alisases.

System.String filter

The set of filters which will be used to screen the data, should be an SQL WHERE sentence (without WHERE).

Returns
Type Description
System.Int64

Amount of registers found.

| Improve this Doc View Source

CountRoles()

Counts how many roles are in the database.

Declaration
public long CountRoles()
Returns
Type Description
System.Int64

A dataset containing the requested data.

| Improve this Doc View Source

CountUsers()

Counts how many user accounts are in the database.

Declaration
public long CountUsers()
Returns
Type Description
System.Int64

A dataset containing the requested data.

| Improve this Doc View Source

CreateDataBase()

Creates a new and empty database.

Declaration
public void CreateDataBase()
| Improve this Doc View Source

CreateDataBase(String)

Creates a new database instance using an SQL Dump file.

Declaration
public void CreateDataBase(string filePath)
Parameters
Type Name Description
System.String filePath

The SQL Dump file path.

| Improve this Doc View Source

CreateDataBase(String, String)

Creates a new database using a SQL Dump file.

Declaration
[Obsolete("This overload has been deprecated, use other overloads and set the binPath (if needed) using the constructor.")]
public void CreateDataBase(string filePath, string binPath)
Parameters
Type Name Description
System.String filePath

The SQL Dump file path.

System.String binPath

The path to the bin folder [only needed for windows systems].

| Improve this Doc View Source

CreateRole(String)

Creates a new role.

Declaration
public void CreateRole(string role)
Parameters
Type Name Description
System.String role

The role name to create.

| Improve this Doc View Source

CreateUser(String, String)

Creates a new user.

Declaration
public void CreateUser(string user, string password = "")
Parameters
Type Name Description
System.String user
System.String password
| Improve this Doc View Source

Delete(Postgres.Destination)

Deletes some data from a table, the 'ExecuteNonQuery' method can be used for complex filters (and, or, etc.).

Declaration
public void Delete(Postgres.Destination destination)
Parameters
Type Name Description
Postgres.Destination destination

The unique schema and table where the data will be added.

| Improve this Doc View Source

Delete(Postgres.Destination, Postgres.Filter)

Deletes some data from a table, the 'ExecuteNonQuery' method can be used for complex filters (and, or, etc.).

Declaration
public void Delete(Postgres.Destination destination, Postgres.Filter filter)
Parameters
Type Name Description
Postgres.Destination destination

The unique schema and table where the data will be added.

Postgres.Filter filter

A filter over a single field which will be used to screen the data, subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

| Improve this Doc View Source

Delete(Postgres.Destination, Postgres.Source, Postgres.Filter)

Deletes some data from a table, the 'ExecuteNonQuery' method can be used for complex filters (and, or, etc.).

Declaration
public void Delete(Postgres.Destination destination, Postgres.Source source, Postgres.Filter filter)
Parameters
Type Name Description
Postgres.Destination destination

The unique schema and table where the data will be added.

Postgres.Source source

The set of schemas and tables from which the data will be loaded, should be an SQL FROM sentence (without FROM) allowing joins and alisases.

Postgres.Filter filter

A filter over a single field which will be used to screen the data, subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

| Improve this Doc View Source

Delete(String, String, String)

Delete some data from a table, the 'ExecuteNonQuery' method can be used for complex filters (and, or, etc.).

Declaration
public void Delete(string destination, string source, string filter)
Parameters
Type Name Description
System.String destination

The unique schema and table where the data will be added.

System.String source

The set of schemas and tables from which the data will be loaded, should be an SQL FROM sentence (without FROM) allowing joins and alisases.

System.String filter

The set of filters which will be used to screen the data, should be an SQL WHERE sentence (without WHERE).

| Improve this Doc View Source

Dispose()

Cleans and releases memory for unnatended objects.

Declaration
public override void Dispose()
Overrides
AutoCheck.Core.Connector.Dispose()
| Improve this Doc View Source

DropDataBase()

Drops the current database.

Declaration
public void DropDataBase()
| Improve this Doc View Source

DropRole(String)

Removes an existing role.

Declaration
public void DropRole(string role)
Parameters
Type Name Description
System.String role

The role name to remove.

| Improve this Doc View Source

DropUser(String)

Removes an existing user.

Declaration
public void DropUser(string user)
Parameters
Type Name Description
System.String user
| Improve this Doc View Source

ExecuteNonQuery(String)

Runs a query that produces no output.

Declaration
public void ExecuteNonQuery(string query)
Parameters
Type Name Description
System.String query

The query to run.

| Improve this Doc View Source

ExecuteQuery(String)

Runs a query that produces an output as a set of data.

Declaration
public DataSet ExecuteQuery(string query)
Parameters
Type Name Description
System.String query

The query to run.

Returns
Type Description
System.Data.DataSet

The dataset containing all the output.

| Improve this Doc View Source

ExecuteScalar<T>(String)

Runs a query that produces an output as a single data.

Declaration
public T ExecuteScalar<T>(string query)
Parameters
Type Name Description
System.String query

The query to run.

Returns
Type Description
T

The requested item.

Type Parameters
Name Description
T
| Improve this Doc View Source

ExistsDataBase()

Checks if the database exists.

Declaration
public bool ExistsDataBase()
Returns
Type Description
System.Boolean

True if the database exists.

| Improve this Doc View Source

ExistsRole(String)

Declaration
public bool ExistsRole(string role)
Parameters
Type Name Description
System.String role
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ExistsUser(String)

Declaration
public bool ExistsUser(string user)
Parameters
Type Name Description
System.String user
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetField<T>(Postgres.Source, Postgres.Filter, String, ListSortDirection)

Returns the requested field's value for the first found item.

Declaration
public T GetField<T>(Postgres.Source source, Postgres.Filter filter, string field, ListSortDirection sort = ListSortDirection.Descending)
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

Postgres.Filter filter

A filter over a single field which will be used to screen the data, subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

System.String field

The wanted field's name.

System.ComponentModel.ListSortDirection sort

Defines how to order the list, so the max value will be returned when "descending" and min value when "ascending"..

Returns
Type Description
T

The item's field value, NULL if not found.

Type Parameters
Name Description
T
Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

GetField<T>(Postgres.Source, String, ListSortDirection)

Returns the requested field's value for the first found item.

Declaration
public T GetField<T>(Postgres.Source source, string field, ListSortDirection sort = ListSortDirection.Descending)
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

System.String field

The wanted field's name.

System.ComponentModel.ListSortDirection sort

Defines how to order the list, so the max value will be returned when "descending" and min value when "ascending"..

Returns
Type Description
T

The item's field value, NULL if not found.

Type Parameters
Name Description
T
Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

GetField<T>(String, String, String, ListSortDirection)

Returns the requested field's value for the first found item.

Declaration
public T GetField<T>(string source, string filter, string field, ListSortDirection sort = ListSortDirection.Descending)
Parameters
Type Name Description
System.String source

The set of schemas and tables from which the data will be loaded, should be an SQL FROM sentence (without FROM) allowing joins and alisases.

System.String filter

The set of filters which will be used to screen the data, should be an SQL WHERE sentence (without WHERE).

System.String field

The wanted field's name.

System.ComponentModel.ListSortDirection sort

Defines how to order the list, so the max value will be returned when "descending" and min value when "ascending"..

Returns
Type Description
T

The item's field value, NULL if not found.

Type Parameters
Name Description
T
| Improve this Doc View Source

GetForeignKeys(Postgres.Source)

Returns the information about all the foreign keys defined over a table.

Declaration
public DataSet GetForeignKeys(Postgres.Source source)
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the foreign keys will be loaded.

Returns
Type Description
System.Data.DataSet

The view definition as an SQL SELECT query.

| Improve this Doc View Source

GetForeignKeys(String)

Returns the information about all the foreign keys defined over a table.

Declaration
public DataSet GetForeignKeys(string source)
Parameters
Type Name Description
System.String source

The unique schema and table from which the foreign keys will be loaded, as 'schema.table'.

Returns
Type Description
System.Data.DataSet

The foreign keys data.

| Improve this Doc View Source

GetMembership(String)

Get a list of groups and roles where the given item (user, role or group) belongs.

Declaration
public DataSet GetMembership(string item)
Parameters
Type Name Description
System.String item

The role to check.

Returns
Type Description
System.Data.DataSet

The requested data (rolname, memberOf)

| Improve this Doc View Source

GetRoles()

Requests for all the roles created.

Declaration
public DataSet GetRoles()
Returns
Type Description
System.Data.DataSet

A dataset containing the requested data ('rolname').

| Improve this Doc View Source

GetSchemaPrivileges(String, String)

Returns the schema privileges.

Declaration
public DataSet GetSchemaPrivileges(string schema, string role = null)
Parameters
Type Name Description
System.String schema

The schema containing the table to check.

System.String role

The role which privileges will be checked.

Returns
Type Description
System.Data.DataSet

The requested data (grantee, privilege).

| Improve this Doc View Source

GetTablePrivileges(Postgres.Source, String)

Returns the table privileges.

Declaration
public DataSet GetTablePrivileges(Postgres.Source source, string role = null)
Parameters
Type Name Description
Postgres.Source source

The source which permissions will be requested.

System.String role

The role which privileges will be checked.

Returns
Type Description
System.Data.DataSet

The requested data (grantee, privilege).

| Improve this Doc View Source

GetTablePrivileges(String, String)

Returns the table privileges.

Declaration
public DataSet GetTablePrivileges(string source, string role = null)
Parameters
Type Name Description
System.String source

The table which permissions will be requested as 'schema.table'.

System.String role

The role which privileges will be checked.

Returns
Type Description
System.Data.DataSet

The table privileges.

| Improve this Doc View Source

GetUsers()

Requests for all the users created.

Declaration
public DataSet GetUsers()
Returns
Type Description
System.Data.DataSet

A dataset containing the requested data ('username', 'attributes').

| Improve this Doc View Source

GetViewDefinition(Postgres.Source)

Given a view, return its definition as a select query.

Declaration
public string GetViewDefinition(Postgres.Source source)
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

Returns
Type Description
System.String

The view definition as an SQL SELECT query.

| Improve this Doc View Source

GetViewDefinition(String)

Given a view, return its definition as a select query.

Declaration
public string GetViewDefinition(string source)
Parameters
Type Name Description
System.String source

The unique schema and table from which the data will be loaded, as 'schema.table'.

Returns
Type Description
System.String

The view definition as an SQL SELECT query.

| Improve this Doc View Source

Grant(String, Postgres.Destination, String)

Grants an item (role, group or permission) to a destination (role, group or user).

Declaration
public void Grant(string what, Postgres.Destination where, string who)
Parameters
Type Name Description
System.String what

What to grant (permission).

Postgres.Destination where

Where to grant (table).

System.String who

Who to grant (role, group or user).

| Improve this Doc View Source

Grant(String, String)

Grants an item (role, group or permissio) to a destination (role, group or user).

Declaration
public void Grant(string what, string where)
Parameters
Type Name Description
System.String what

Who to grant (role, group or user) or the permission to grant as an SQL compatible statement like 'permission ON schema.table'.

System.String where

Where to grant (destination: role, group or user).

| Improve this Doc View Source

Grant(String, String, String)

Grants an item (role, group or permission) to a destination (role, group or user).

Declaration
public void Grant(string what, string where, string who)
Parameters
Type Name Description
System.String what

What to grant (permission).

System.String where

Where to grant (schema).

System.String who

Who to grant (role, group or user).

| Improve this Doc View Source

ImportSqlFile(String)

Imports an SQL into the current database.

Declaration
public void ImportSqlFile(string filePath)
Parameters
Type Name Description
System.String filePath
| Improve this Doc View Source

Insert(Postgres.Destination, Dictionary<String, Object>)

Inserts new data into a table.

Declaration
public void Insert(Postgres.Destination destination, Dictionary<string, object> fields)
Parameters
Type Name Description
Postgres.Destination destination

The unique schema and table where the data will be added.

System.Collections.Generic.Dictionary<System.String, System.Object> fields

Key-value pairs of data [field, value], subqueries as values must start with @.

Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

Insert(String, Dictionary<String, Object>)

Inserts new data into a table.

Declaration
public void Insert(string destination, Dictionary<string, object> fields)
Parameters
Type Name Description
System.String destination

The schema and table where the data will be added, should be an SQL INTO sentence (schema.table).

System.Collections.Generic.Dictionary<System.String, System.Object> fields

Key-value pairs of data [field, value], subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

| Improve this Doc View Source

Insert<T>(Postgres.Destination, String, Dictionary<String, Object>)

Declaration
public T Insert<T>(Postgres.Destination destination, string primaryKey, Dictionary<string, object> fields)
Parameters
Type Name Description
Postgres.Destination destination
System.String primaryKey
System.Collections.Generic.Dictionary<System.String, System.Object> fields
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

Insert<T>(String, String, Dictionary<String, Object>)

Declaration
public T Insert<T>(string destination, string primaryKey, Dictionary<string, object> fields)
Parameters
Type Name Description
System.String destination
System.String primaryKey
System.Collections.Generic.Dictionary<System.String, System.Object> fields
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

Revoke(String, Postgres.Destination, String)

Revokes an item (role, group or permission) from a destination (role, group or user).

Declaration
public void Revoke(string what, Postgres.Destination where, string who)
Parameters
Type Name Description
System.String what

What to revoke (permission).

Postgres.Destination where

Where to revoke (schema).

System.String who

Who to revoke (role, group or user).

| Improve this Doc View Source

Revoke(String, String)

Revokes an item (role, group or permissio) from a destination (role, group or user).

Declaration
public void Revoke(string what, string where)
Parameters
Type Name Description
System.String what

Who to revoke (role, group or user) or the permission to revoke as an SQL compatible statement like 'permission FROM schema.table'.

System.String where

Where to revoke (destination: role, group or user).

| Improve this Doc View Source

Revoke(String, String, String)

Revokes an item (role, group or permission) from a destination (role, group or user).

Declaration
public void Revoke(string what, string where, string who)
Parameters
Type Name Description
System.String what

What to revoke (permission).

System.String where

Where to revoke (schema).

System.String who

Who to revoke (role, group or user).

| Improve this Doc View Source

Select(Postgres.Source, Postgres.Filter, String)

Selects some data from the database.

Declaration
public DataSet Select(Postgres.Source source, Postgres.Filter filter, string field = "*")
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

Postgres.Filter filter

A filter over a single field which will be used to screen the data, subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

System.String field

The field's data to load (a single one, or comma-separated set).

Returns
Type Description
System.Data.DataSet

A dataset containing the requested data.

Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

Select(Postgres.Source, Postgres.Filter, String[])

Selects some data from the database.

Declaration
public DataSet Select(Postgres.Source source, Postgres.Filter filter, string[] fields)
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

Postgres.Filter filter

A filter over a single field which will be used to screen the data, subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

System.String[] fields

The set of field's data to load.

Returns
Type Description
System.Data.DataSet

A dataset containing the requested data.

Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

Select(Postgres.Source, String)

Selects some data from the database.

Declaration
public DataSet Select(Postgres.Source source, string field = "*")
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

System.String field

The field's data to load (a single one, or comma-separated set).

Returns
Type Description
System.Data.DataSet

A dataset containing the requested data.

Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

Select(Postgres.Source, String[])

Selects some data from the database.

Declaration
public DataSet Select(Postgres.Source source, string[] fields)
Parameters
Type Name Description
Postgres.Source source

The unique schema and table from which the data will be loaded.

System.String[] fields

The set of field's data to load.

Returns
Type Description
System.Data.DataSet

A dataset containing the requested data.

Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

Select(String, String, String)

Selects some data from the database.

Declaration
public DataSet Select(string source, string filter, string field = "*")
Parameters
Type Name Description
System.String source

The set of schemas and tables from which the data will be loaded, should be an SQL FROM sentence (without FROM) allowing joins and alisases.

System.String filter

The set of filters which will be used to screen the data, should be an SQL WHERE sentence (without WHERE).

System.String field

The field's data to load (a single one, or comma-separated set).

Returns
Type Description
System.Data.DataSet

A dataset containing the requested data.

| Improve this Doc View Source

Select(String, String, String[])

Selects some data from the database.

Declaration
public DataSet Select(string source, string filter, string[] fields)
Parameters
Type Name Description
System.String source

The set of schemas and tables from which the data will be loaded, should be an SQL FROM sentence (without FROM) allowing joins and alisases.

System.String filter

The set of filters which will be used to screen the data, should be an SQL WHERE sentence (without WHERE).

System.String[] fields

The set of field's data to load.

Returns
Type Description
System.Data.DataSet

A dataset containing the requested data.

| Improve this Doc View Source

TestConnection()

Test the connection to the database, so an exception will be thrown if any problem occurs.

Declaration
public void TestConnection()
| Improve this Doc View Source

Update(Postgres.Destination, Postgres.Filter, Dictionary<String, Object>)

Updates some data from a table, the 'ExecuteNonQuery' method can be used for complex filters (and, or, etc.).

Declaration
public void Update(Postgres.Destination destination, Postgres.Filter filter, Dictionary<string, object> fields)
Parameters
Type Name Description
Postgres.Destination destination

The unique schema and table where the data will be added.

Postgres.Filter filter

A filter over a single field which will be used to screen the data, subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

System.Collections.Generic.Dictionary<System.String, System.Object> fields

Key-value pairs of data [field, value], subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

Update(Postgres.Destination, Postgres.Source, Postgres.Filter, Dictionary<String, Object>)

Updates some data from a table, the 'ExecuteNonQuery' method can be used for complex filters (and, or, etc.).

Declaration
public void Update(Postgres.Destination destination, Postgres.Source source, Postgres.Filter filter, Dictionary<string, object> fields)
Parameters
Type Name Description
Postgres.Destination destination

The unique schema and table where the data will be added.

Postgres.Source source

The set of schemas and tables from which the data will be loaded, should be an SQL FROM sentence (without FROM) allowing joins and alisases.

Postgres.Filter filter

A filter over a single field which will be used to screen the data, subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

System.Collections.Generic.Dictionary<System.String, System.Object> fields

Key-value pairs of data [field, value], subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

Update(Postgres.Destination, Dictionary<String, Object>)

Updates some data from a table, the 'ExecuteNonQuery' method can be used for complex filters (and, or, etc.).

Declaration
public void Update(Postgres.Destination destination, Dictionary<string, object> fields)
Parameters
Type Name Description
Postgres.Destination destination

The unique schema and table where the data will be added.

System.Collections.Generic.Dictionary<System.String, System.Object> fields

Key-value pairs of data [field, value], subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

Remarks

Use the overload with only string parameters for complex queries.

| Improve this Doc View Source

Update(String, String, String, Dictionary<String, Object>)

Updates some data from a table, the 'ExecuteNonQuery' method can be used for complex filters (and, or, etc.).

Declaration
public void Update(string destination, string source, string filter, Dictionary<string, object> fields)
Parameters
Type Name Description
System.String destination

The unique schema and table where the data will be added.

System.String source

The set of schemas and tables from which the data will be loaded, should be an SQL FROM sentence (without FROM) allowing joins and alisases.

System.String filter

The set of filters which will be used to screen the data, should be an SQL WHERE sentence (without WHERE).

System.Collections.Generic.Dictionary<System.String, System.Object> fields

Key-value pairs of data [field, value], subqueries are allowed but must start with '@' and surrounded by parenthesis like '@(SELECT MAX(id)+1 FROM t)'.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX