public static DataSet Run() { using (var mysql = new MySqlData()) { return mysql.ExecuteDataSet("GetRetweetRank", commandType: CommandType.StoredProcedure); } }
public static DataSet Run(DateTime startTime, DateTime endTime) { using (var mysql = new MySqlData()) { return mysql.ExecuteDataSet("GetRetweetRankTimeFilter", commandType: CommandType.StoredProcedure, list: new [] { new MySqlParameter("@StartTime", startTime), new MySqlParameter("@EndTime", endTime) }); } }
public static DataSet Select(string since, bool fromApi = true, string where = null) { using (var mysql = new MySqlData()) { string whereClause = ""; if (where != null) { whereClause = " AND Data LIKE @Like "; } // LIKE CONCAT('\'%' + in_arg + '%\'')) string sql = "SELECT Id, Data FROM twitterstatus " + " WHERE Id > @Id " + whereClause + "ORDER BY Id"; if (fromApi) sql += " LIMIT 500"; return mysql.ExecuteDataSet(sql, new[] { new MySqlParameter("@Id", long.Parse(since)), (where != null) ? new MySqlParameter("@Like", "%" + where + "%") : null}); } }