C# 클래스 Azavea.Open.DAO.SQLServer.SQLServerDescriptor

This class represents the info necessary to connect to a SQL Server database. TODO: Add support for SQL Server Spatial.
상속: Azavea.Open.DAO.SQL.AbstractSqlConnectionDescriptor, ITransactionalConnectionDescriptor
파일 보기 프로젝트 열기: azavea/net-dao-sqlserver 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Database string
Password string
Server string
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.

ColumnAliasPrefix ( ) : string
ColumnAliasSuffix ( ) : string
CreateDataAccessLayer ( ) : IDaLayer
CreateNewAdapter ( IDbCommand cmd ) : DbDataAdapter
CreateNewConnection ( ) : DbConnection
MakeBitwiseAndClause ( string columnName ) : SqlClauseWithValue
MakeConnectionString ( string server, string database, string user, string password ) : string

Assembles a 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.

MakeModulusClause ( string fieldName ) : SqlClauseWithValue
NeedAsForColumnAliases ( ) : bool
NeedToAliasColumns ( ) : bool
SQLServerDescriptor ( Config config, string component, ConnectionInfoDecryptionDelegate decryptionDelegate ) : System

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

SQLServerDescriptor ( string server, string database, string user, string password ) : System

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

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

메소드 상세

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

ColumnAliasPrefix() 공개 메소드

public ColumnAliasPrefix ( ) : string
리턴 string

ColumnAliasSuffix() 공개 메소드

public ColumnAliasSuffix ( ) : string
리턴 string

CreateDataAccessLayer() 공개 메소드

public CreateDataAccessLayer ( ) : IDaLayer
리턴 IDaLayer

CreateNewAdapter() 공개 메소드

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

CreateNewConnection() 공개 메소드

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

MakeBitwiseAndClause() 공개 메소드

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

MakeConnectionString() 공개 정적인 메소드

Assembles a 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 server, string database, string user, string password ) : string
server string Server name that is hosting the database
database string Database name on the server.
user string User name to use when accessing the db.
password string Password for above user.
리턴 string

MakeModulusClause() 공개 메소드

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

NeedAsForColumnAliases() 공개 메소드

public NeedAsForColumnAliases ( ) : bool
리턴 bool

NeedToAliasColumns() 공개 메소드

public NeedToAliasColumns ( ) : bool
리턴 bool

SQLServerDescriptor() 공개 메소드

This constructor reads all the appropriate values from a config file.
public SQLServerDescriptor ( 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

SQLServerDescriptor() 공개 메소드

Constructor that lets you pass everything as parameters rather than requiring a config.
public SQLServerDescriptor ( string server, string database, string user, string password ) : System
server string Server name. May not be null.
database string Database name on that server. May not be null.
user string Database user name, may be null.
password string Password for the user. May be null.
리턴 System

SetParametersOnCommand() 공개 메소드

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

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

프로퍼티 상세

Database 공개적으로 프로퍼티

The database name. May not be null.
public string Database
리턴 string

Password 공개적으로 프로퍼티

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

Server 공개적으로 프로퍼티

The server name. May not be null.
public string Server
리턴 string

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