Example #1
0
        internal IEnumerable <int> QueryIntegerArray(OracleConnection connection, string column, object[] conditions)
        {
            switch (conditions.Length)
            {
            case 2:
                var sql2 = $"select {column} from {table} where {conditions[0].ToString()}=:0";
                return(QM.QueryIntegerArray(connection, sql2, new object[] { conditions[1] }));

            case 4:
                var sql4 = $"select {column} from {table} where {conditions[0].ToString()}=:0 and {conditions[2].ToString()}=:1";
                return(QM.QueryIntegerArray(connection, sql4, new object[] { conditions[1], conditions[3] }));

            default:
                throw new NotImplementedException($"length = {conditions.Length}");
            }
        }