Exemple #1
0
        public PqsqlParameterBuffer(PqsqlParameterCollection parameterCollection)
        {
#if CODECONTRACTS
            Contract.Requires <ArgumentNullException>(parameterCollection != null);
#else
            if (parameterCollection == null)
            {
                throw new ArgumentNullException(nameof(parameterCollection));
            }
#endif

            Init();

            AddParameterCollection(parameterCollection);
        }
Exemple #2
0
        /// <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);
            }
        }
Exemple #3
0
 public PqsqlCommand(string query, PqsqlConnection conn)
 {
     Init(query);
     mParams = new PqsqlParameterCollection();
     mConn   = conn;
 }