C# 클래스 Azavea.Open.DAO.OleDb.OleDbDescriptor

This class represents the info necessary to connect to an OleDb data source.
상속: Azavea.Open.DAO.SQL.AbstractSqlConnectionDescriptor, ITransactionalConnectionDescriptor
파일 보기 프로젝트 열기: azavea/net-dao-oledb 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ConnectTimeout int?
Database string
Password string
Provider string
Server string
Type DatabaseType
User string

보호된 프로퍼티들

프로퍼티 타입 설명
_cleanConnStr string
_connectionStr string

공개 메소드들

메소드 설명
BeginTransaction ( ) : ITransaction

Begins the transaction. Returns a NEW ConnectionDescriptor that you should use for operations you wish to be part of the transaction. NOTE: You MUST call Commit or Rollback on the returned ITransaction when you are done.

CanUseAliasInOrderClause ( ) : bool
CaseInsensitiveLikeOperator ( ) : string
ColumnAliasPrefix ( ) : string
ColumnAliasSuffix ( ) : string
CreateDataAccessLayer ( ) : IDaLayer

Returns the appropriate data access layer for this connection. The default implementation returns a normal SQL data access layer, but this may be overridden in particular DB connection descriptors.

CreateNewAdapter ( IDbCommand cmd ) : DbDataAdapter
CreateNewConnection ( ) : DbConnection
FullOuterJoinKeyword ( ) : string
GuessTypeFromProvider ( string provider ) : DatabaseType

Attempts to parse the provider string and determine what database type we're connecting to.

HasCaseInsensitiveLikeOperator ( ) : bool
LowerCaseFunction ( ) : string
MakeBitwiseAndClause ( string columnName ) : SqlClauseWithValue
MakeConnectionString ( DatabaseType providerType, string server, string database, string user, string password, int connectionTimeout ) : string

Assembles a OLEDB connection string that can be used to get a database connection. All the parameters are optional for the purposes of this method, although obviously it would be possible to create a useless connection string if you leave out important parameters.

MakeConnectionString ( string provider, string server, string database, string user, string password, int connectionTimeout ) : string

Assembles a OLEDB connection string that can be used to get a database connection. All the parameters are optional for the purposes of this method, although obviously it would be possible to create a useless connection string if you leave out important parameters.

MakeCreateIndexCommand ( string indexName, bool isUnique, string tableName, IEnumerable columnNames ) : string
MakeModulusClause ( string fieldName ) : SqlClauseWithValue
MakeSequenceValueQuery ( string sequenceName ) : string
NeedAsForColumnAliases ( ) : bool
NeedToAliasColumns ( ) : bool
OleDbDescriptor ( Config config, string component, ConnectionInfoDecryptionDelegate decryptionDelegate ) : System

This constructor reads all the appropriate values from a config file.

OleDbDescriptor ( DatabaseType type, string server, string database, string user, string password, int timeout ) : System

Constructor that lets you pass everything as parameters rather than requiring a config.

OleDbDescriptor ( DatabaseType type, string provider, string server, string database, string user, string password, int timeout ) : System

Constructor that lets you pass everything as parameters rather than requiring a config.

OleDbDescriptor ( string provider, string server, string database, string user, string password, int timeout ) : System

Constructor that lets you pass everything as parameters rather than requiring a config.

SetParametersOnCommand ( IDbCommand cmd, IEnumerable parameters ) : void
SupportsTruncate ( ) : bool
TableAliasPrefix ( ) : string
TableAliasSuffix ( ) : string
ToCleanString ( ) : string
ToCompleteString ( ) : string
UsePooling ( ) : bool

비공개 메소드들

메소드 설명
GetTypeFromConfig ( Config config, string component ) : DatabaseType

Gets the type based on a couple optional parameters in the DB config file.

메소드 상세

BeginTransaction() 공개 메소드

Begins the transaction. Returns a NEW ConnectionDescriptor that you should use for operations you wish to be part of the transaction. NOTE: You MUST call Commit or Rollback on the returned ITransaction when you are done.
public BeginTransaction ( ) : ITransaction
리턴 ITransaction

CanUseAliasInOrderClause() 공개 메소드

public CanUseAliasInOrderClause ( ) : bool
리턴 bool

CaseInsensitiveLikeOperator() 공개 메소드

public CaseInsensitiveLikeOperator ( ) : string
리턴 string

ColumnAliasPrefix() 공개 메소드

public ColumnAliasPrefix ( ) : string
리턴 string

ColumnAliasSuffix() 공개 메소드

public ColumnAliasSuffix ( ) : string
리턴 string

CreateDataAccessLayer() 공개 메소드

Returns the appropriate data access layer for this connection. The default implementation returns a normal SQL data access layer, but this may be overridden in particular DB connection descriptors.
public CreateDataAccessLayer ( ) : IDaLayer
리턴 IDaLayer

CreateNewAdapter() 공개 메소드

public CreateNewAdapter ( IDbCommand cmd ) : DbDataAdapter
cmd IDbCommand
리턴 System.Data.Common.DbDataAdapter

CreateNewConnection() 공개 메소드

public CreateNewConnection ( ) : DbConnection
리턴 System.Data.Common.DbConnection

FullOuterJoinKeyword() 공개 메소드

public FullOuterJoinKeyword ( ) : string
리턴 string

GuessTypeFromProvider() 공개 정적인 메소드

Attempts to parse the provider string and determine what database type we're connecting to.
public static GuessTypeFromProvider ( string provider ) : DatabaseType
provider string OleDB "provider" piece of the connection string.
리턴 DatabaseType

HasCaseInsensitiveLikeOperator() 공개 메소드

public HasCaseInsensitiveLikeOperator ( ) : bool
리턴 bool

LowerCaseFunction() 공개 메소드

public LowerCaseFunction ( ) : string
리턴 string

MakeBitwiseAndClause() 공개 메소드

public MakeBitwiseAndClause ( string columnName ) : SqlClauseWithValue
columnName string
리턴 Azavea.Open.DAO.SQL.SqlClauseWithValue

MakeConnectionString() 공개 정적인 메소드

Assembles a OLEDB connection string that can be used to get a database connection. All the parameters are optional for the purposes of this method, although obviously it would be possible to create a useless connection string if you leave out important parameters.
public static MakeConnectionString ( DatabaseType providerType, string server, string database, string user, string password, int connectionTimeout ) : string
providerType DatabaseType Database type, will be used to determine provider string.
server string Server name that is hosting the database
database string Database name, if necessary to specify
user string User name to use when accessing the db
password string Password for above user.
connectionTimeout int How long to wait before giving up on a command, in seconds.
리턴 string

MakeConnectionString() 공개 정적인 메소드

Assembles a OLEDB connection string that can be used to get a database connection. All the parameters are optional for the purposes of this method, although obviously it would be possible to create a useless connection string if you leave out important parameters.
public static MakeConnectionString ( string provider, string server, string database, string user, string password, int connectionTimeout ) : string
provider string Database driver/type/something, for example "SQLOLEDB"
server string Server name that is hosting the database
database string Database name, if necessary to specify
user string User name to use when accessing the db
password string Password for above user.
connectionTimeout int How long to wait before giving up on a command, in seconds.
리턴 string

MakeCreateIndexCommand() 공개 메소드

public MakeCreateIndexCommand ( string indexName, bool isUnique, string tableName, IEnumerable columnNames ) : string
indexName string
isUnique bool
tableName string
columnNames IEnumerable
리턴 string

MakeModulusClause() 공개 메소드

public MakeModulusClause ( string fieldName ) : SqlClauseWithValue
fieldName string
리턴 Azavea.Open.DAO.SQL.SqlClauseWithValue

MakeSequenceValueQuery() 공개 메소드

public MakeSequenceValueQuery ( string sequenceName ) : string
sequenceName string
리턴 string

NeedAsForColumnAliases() 공개 메소드

public NeedAsForColumnAliases ( ) : bool
리턴 bool

NeedToAliasColumns() 공개 메소드

public NeedToAliasColumns ( ) : bool
리턴 bool

OleDbDescriptor() 공개 메소드

This constructor reads all the appropriate values from a config file.
public OleDbDescriptor ( Config config, string component, ConnectionInfoDecryptionDelegate decryptionDelegate ) : System
config Azavea.Open.Common.Config Config to get params from.
component string Section of the config XML to look in for db params.
decryptionDelegate ConnectionInfoDecryptionDelegate Delegate to call to decrypt password fields. /// May be null if passwords are in plain text.
리턴 System

OleDbDescriptor() 공개 메소드

Constructor that lets you pass everything as parameters rather than requiring a config.
public OleDbDescriptor ( DatabaseType type, string server, string database, string user, string password, int timeout ) : System
type DatabaseType Type of database to connect to. May not be null. This parameter /// will be used to determine what OleDb provider to use.
server string Server (or in the case of access, .mdb file) May be null, but you /// probably won't be able to connect to anything.
database string database name on that server, if applicable. May be null.
user string Database user name, may be null.
password string Password for the user. May be null.
timeout int Connection timeout, in seconds. May be null.
리턴 System

OleDbDescriptor() 공개 메소드

Constructor that lets you pass everything as parameters rather than requiring a config.
public OleDbDescriptor ( DatabaseType type, string provider, string server, string database, string user, string password, int timeout ) : System
type DatabaseType Type of database to connect to. May not be null. This parameter /// will be used to determine what OleDb provider to use.
provider string Database provider string. May be null. If null, we will use a /// provider value based on the type, if not null, we will use this /// provider.
server string Server (or in the case of access, .mdb file) May be null, but you /// probably won't be able to connect to anything.
database string database name on that server, if applicable. May be null.
user string Database user name, may be null.
password string Password for the user. May be null.
timeout int Connection timeout, in seconds. May be null.
리턴 System

OleDbDescriptor() 공개 메소드

Constructor that lets you pass everything as parameters rather than requiring a config.
public OleDbDescriptor ( string provider, string server, string database, string user, string password, int timeout ) : System
provider string Database provider string. May not be null.
server string Server (or in the case of access, .mdb file) May be null, but you /// probably won't be able to connect to anything.
database string database name on that server, if applicable. May be null.
user string Database user name, may be null.
password string Password for the user. May be null.
timeout int Connection timeout, in seconds. May be null.
리턴 System

SetParametersOnCommand() 공개 메소드

public SetParametersOnCommand ( IDbCommand cmd, IEnumerable parameters ) : void
cmd IDbCommand
parameters IEnumerable
리턴 void

SupportsTruncate() 공개 메소드

public SupportsTruncate ( ) : bool
리턴 bool

TableAliasPrefix() 공개 메소드

public TableAliasPrefix ( ) : string
리턴 string

TableAliasSuffix() 공개 메소드

public TableAliasSuffix ( ) : string
리턴 string

ToCleanString() 공개 메소드

public ToCleanString ( ) : string
리턴 string

ToCompleteString() 공개 메소드

public ToCompleteString ( ) : string
리턴 string

UsePooling() 공개 메소드

public UsePooling ( ) : bool
리턴 bool

프로퍼티 상세

ConnectTimeout 공개적으로 프로퍼티

The connection timeout, in seconds. May be null, meaning use the default.
public int? ConnectTimeout
리턴 int?

Database 공개적으로 프로퍼티

The database name, meaningful for some databases (Access (filename), SQL Server) but not others (Oracle). May be null depending on the database.
public string Database
리턴 string

Password 공개적으로 프로퍼티

The password for the User. May be null.
public string Password
리턴 string

Provider 공개적으로 프로퍼티

The "Provider", meaning the value for the provider field in the OleDB connection string.
public string Provider
리턴 string

Server 공개적으로 프로퍼티

The server name, meaningful for some databases (Oracle, SQL Server) but not others (Access). May be null depending on the database.
public string Server
리턴 string

Type 공개적으로 프로퍼티

The type of database (Oracle, SQL Server, etc).
public DatabaseType Type
리턴 DatabaseType

User 공개적으로 프로퍼티

The user name, if necessary to log into the database. May be null.
public string User
리턴 string

_cleanConnStr 보호되어 있는 프로퍼티

protected string _cleanConnStr
리턴 string

_connectionStr 보호되어 있는 프로퍼티

protected string _connectionStr
리턴 string