C# Class MySql.MysqlHelper.ConnectionString

Helper for generating connection string
Datei anzeigen Open project: hthulin/csharp-mysql-helper-library

Public Properties

Property Type Description
allowBatch bool
allowUserVariables bool
allowZeroDatetime bool
compress bool
connectionAttemps int
connectionSleep int
connectionTimeout uint
convertZeroDateTime bool
defaultCommandTimeout uint
password string
pooling bool
port uint
server string
username string

Public Methods

Method Description
ConnectionString ( string server, string uid, string pwd, uint port = 3306 )

Constructor

ToString ( ) : string

ToString() override

Method Details

ConnectionString() public method

Constructor
public ConnectionString ( string server, string uid, string pwd, uint port = 3306 )
server string
uid string
pwd string
port uint

ToString() public method

ToString() override
public ToString ( ) : string
return string

Property Details

allowBatch public_oe property

When true, multiple SQL statements can be sent with one command execution. Note: starting with MySQL 4.1.1, batch statements should be separated by the server-defined separator character. Statements sent to earlier versions of MySQL should be separated by ';'
public bool allowBatch
return bool

allowUserVariables public_oe property

Setting this to true indicates that the provider expects user variables in the SQL. This option was added in Connector/Net version 5.2.2.
public bool allowUserVariables
return bool

allowZeroDatetime public_oe property

If set to True, MySqlDataReader.GetValue() returns a MySqlDateTime object for date or datetime columns that have disallowed values, such as zero datetime values, and a System.DateTime object for valid values. If set to False (the default setting) it causes a System.DateTime object to be returned for all valid values and an exception to be thrown for disallowed values, such as zero datetime values.
public bool allowZeroDatetime
return bool

compress public_oe property

Setting this option to true enables compression of packets exchanged between the client and the server. This exchange is defined by the MySQL client/server protocol. Compression is used if both client and server support ZLIB compression, and the client has requested compression using this option. A compressed packet header is: packet length (3 bytes), packet number (1 byte), and Uncompressed Packet Length (3 bytes). The Uncompressed Packet Length is the number of bytes in the original, uncompressed packet. If this is zero, the data in this packet has not been compressed. When the compression protocol is in use, either the client or the server may compress packets. However, compression will not occur if the compressed length is greater than the original length. Thus, some packets will contain compressed data while other packets will not.
public bool compress
return bool

connectionAttemps public_oe property

public int connectionAttemps
return int

connectionSleep public_oe property

public int connectionSleep
return int

connectionTimeout public_oe property

The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.
public uint connectionTimeout
return uint

convertZeroDateTime public_oe property

True to have MySqlDataReader.GetValue() and MySqlDataReader.GetDateTime() return DateTime.MinValue for date or datetime columns that have disallowed values.
public bool convertZeroDateTime
return bool

defaultCommandTimeout public_oe property

Sets the default value of the command timeout to be used. This does not supersede the individual command timeout property on an individual command object. If you set the command timeout property, that will be used. This option was added in Connector/Net 5.1.4
public uint defaultCommandTimeout
return uint

password public_oe property

The password for the MySQL account being used.
public string password
return string

pooling public_oe property

When true, the MySqlConnection object is drawn from the appropriate pool, or if necessary, is created and added to the appropriate pool. Recognized values are true, false, yes, and no.
public bool pooling
return bool

port public_oe property

The port MySQL is using to listen for connections. This value is ignored if Unix socket is used.
public uint port
return uint

server public_oe property

The name or network address of the instance of MySQL to which to connect. Multiple hosts can be specified separated by commas. This can be useful where multiple MySQL servers are configured for replication and you are not concerned about the precise server you are connecting to. No attempt is made by the provider to synchronize writes to the database, so take care when using this option. In Unix environment with Mono, this can be a fully qualified path to a MySQL socket file. With this configuration, the Unix socket is used instead of the TCP/IP socket. Currently, only a single socket name can be given, so accessing MySQL in a replicated environment using Unix sockets is not currently supported.
public string server
return string

username public_oe property

The MySQL login account being used.
public string username
return string