public QueryResult Query(string sql, params object[] values)
        {
            sql = QueryUtil.Queryfy(sql, values);
            var cmd = new MySqlCommand(sql, Connection);

            return(new QueryResult(cmd.ExecuteReader()));
        }
        public int Execute(string sql, params object[] values)
        {
            sql = QueryUtil.Queryfy(sql, values);
            var cmd = new MySqlCommand(sql, Connection);

            return(cmd.ExecuteNonQuery());
        }
Example #3
0
 SelectQueryer.Selecter SelectQuery(string sql, params object[] values)
 {
     select = new SelectQueryer(db,
                                old =>
     {
         MakeEnd = () => MakeSelectEnd(old);
         return(Make);
     }
                                ).Select(QueryUtil.Queryfy(sql, values));
     return(select);
 }
Example #4
0
 protected static string Queryfy(string sql, params object[] values)
 {
     return(QueryUtil.Queryfy(sql, values));
 }
Example #5
0
 public Wherer(Func <string> Maker, Database db, string query, params object[] selects)
     : base(Maker, db)
 {
     Value = QueryUtil.Queryfy(query, selects);
 }
Example #6
0
 internal Joiner(string type, string table, string on, params object[] objs)
 {
     Value = string.Format("{0} JOIN {1} ON {2}",
                           type, table, QueryUtil.Queryfy(on, objs));
 }