public PqsqlParameterBuffer(PqsqlParameterCollection parameterCollection) { #if CODECONTRACTS Contract.Requires <ArgumentNullException>(parameterCollection != null); #else if (parameterCollection == null) { throw new ArgumentNullException(nameof(parameterCollection)); } #endif Init(); AddParameterCollection(parameterCollection); }
/// <summary> /// append each PqsqlParameter from the PqsqlParameterCollection to the parameter buffer. /// </summary> public void AddParameterCollection(PqsqlParameterCollection parameterCollection) { #if CODECONTRACTS Contract.Requires <ArgumentNullException>(parameterCollection != null); #else if (parameterCollection == null) { throw new ArgumentNullException(nameof(parameterCollection)); } #endif foreach (PqsqlParameter p in parameterCollection) { AddParameter(p); } }
public PqsqlCommand(string query, PqsqlConnection conn) { Init(query); mParams = new PqsqlParameterCollection(); mConn = conn; }