using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using edu.jhu.Cas.Web;

namespace RestApi.Models
{
    public class WsUtil
    {
        public static string AddIntoClause(string query, long wsid, string table)
        {
            var filterFactory = new edu.jhu.Cas.Util.FilterFactory();
            if (table == null || table == "" || table.Length <= 1)
            {
                table = WebUtils.GetUniqueTableNameEx(wsid);
            }
            query = filterFactory.StripComments(query);
            query = filterFactory.AddSelectInto(query, table, "MyDB");
            return query;
        }
    }
}