using System;
using System.Text;

namespace  PostCardHitsuji.DataClient.DAO
{
    public class DbUtilDao : AbsDaoHelper<DaoUtilContentModel>
    {

        #region DB最適化

        /// <summary>
        /// DB最適化（VACUUM）
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public int vacuum(object obj)
        {
            try
            {
                var essence = base.getDaoEssence();

                StringBuilder sql = new StringBuilder();
                sql.AppendLine(" vacuum; ");

                essence.setSql(sql.ToString());

                return essence.postUpdate(null);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                return -1;
            }
        }

        #endregion

    }

}
