Azavea.Open.DAO.SQL.SqlConnectionUtilities.XSafeIntListQuery C# (CSharp) Method

XSafeIntListQuery() public static method

Similar to the other XSafe methods, except this one returns a list of integers (for example, SELECT AGE FROM EMPLOYEES).
public static XSafeIntListQuery ( AbstractSqlConnectionDescriptor connDesc, SqlTransaction transaction, string sql, IEnumerable sqlParams ) : IList
connDesc AbstractSqlConnectionDescriptor The database connection descriptor. This is used both as /// a key for caching connections/commands as well as for /// getting the actual database connection the first time.
transaction SqlTransaction The transaction to do this as part of.
sql string The SQL query to execute.
sqlParams IEnumerable A list of objects to use as parameters /// to the SQL statement. The list may be /// null if there are no parameters.
return IList
        public static IList<int> XSafeIntListQuery(AbstractSqlConnectionDescriptor connDesc,
            SqlTransaction transaction, string sql, IEnumerable sqlParams)
        {
            Hashtable parameters = DbCaches.Hashtables.Get();
            XSafeQuery(connDesc, transaction, sql, sqlParams, ReadIntsFromQuery, parameters);
            IList<int> retVal = (IList<int>)parameters["results"];
            DbCaches.Hashtables.Return(parameters);
            return retVal;
        }

Same methods

SqlConnectionUtilities::XSafeIntListQuery ( AbstractSqlConnectionDescriptor connDesc, string sql, IEnumerable sqlParams ) : IList