Connection.this - multiple declarations

Function Connection.this

Construct opened connection.

After the connection is created, and the initial invitation is received from the server client preferences can be set, and authentication can then be attempted.

Prototypes

this(
  string host,
  string user,
  string pwd,
  string db,
  ushort port = cast(ushort)3306u,
  SvrCapFlags capFlags = cast(SvrCapFlags)33293u
);

this(
  MySQLSocketType socketType,
  string host,
  string user,
  string pwd,
  string db,
  ushort port = cast(ushort)3306u,
  SvrCapFlags capFlags = cast(SvrCapFlags)33293u
);

this(
  std.socket.TcpSocket function(string, ushort) openSocket,
  string host,
  string user,
  string pwd,
  string db,
  ushort port = cast(ushort)3306u,
  SvrCapFlags capFlags = cast(SvrCapFlags)33293u
);

Parameters

socketType = Whether to use a Phobos or Vibe.d socket. Default is Phobos, unless -version=Have_vibe_d_core is used. openSocket = Optional callback which should return a newly-opened Phobos or Vibe.d TCP socket. This allows custom sockets to be used, subclassed from Phobos's or Vibe.d's sockets. host = An IP address in numeric dotted form, or as a host name. user = The user name to authenticate. password = Users password. db = Desired initial database. capFlags = The set of flag bits from the server's capabilities that the client requires

Function Connection.this

Construct opened connection.

After the connection is created, and the initial invitation is received from the server client preferences are set, and authentication can then be attempted.

TBD The connection string needs work to allow for semicolons in its parts!

Prototypes

this(
  string cs,
  SvrCapFlags capFlags = cast(SvrCapFlags)33293u
);

this(
  MySQLSocketType socketType,
  string cs,
  SvrCapFlags capFlags = cast(SvrCapFlags)33293u
);

this(
  std.socket.TcpSocket function(string, ushort) openSocket,
  string cs,
  SvrCapFlags capFlags = cast(SvrCapFlags)33293u
);

Parameters

socketType = Whether to use a Phobos or Vibe.d socket. Default is Phobos unless -version=Have_vibe_d_core is used. openSocket = Optional callback which should return a newly-opened Phobos or Vibe.d TCP socket. This allows custom sockets to be used, subclassed from Phobos's or Vibe.d's sockets. cs = A connection string of the form "host=localhost;user=user;pwd=password;db=mysqld" capFlags = The set of flag bits from the server's capabilities that the client requires

Authors

Copyright

License