Beispiel #1
0
        /// <summary>
        /// SQLite 성능을 높히기 위해, PRAGMA 설정을 수행합니다.<br />
        /// 참조 : http://www.sqlite.org/pragma.html
        /// </summary>
        /// <param name="db"></param>
        /// <param name="connection"></param>
        internal static void SetPragma(this SQLiteDatabase db, SQLiteConnection connection) {
            connection.ShouldNotBeNull("connection");

            if(IsDebugEnabled)
                log.Debug("SQLite DB에 PRAMA 설정을 수행합니다... PRAGMA 설정=[{0}]", PragmaSettings);

            try {
                //using(var cmd = new SQLiteCommand(PragmaSettings, connection))
                //	cmd.ExecuteNonQuery();
                new SQLiteCommand(PragmaSettings, connection).ExecuteNonQuery();
            }
            catch(Exception ex) {
                if(log.IsWarnEnabled)
                    log.WarnException("PRAGMA 설정 시에 예외가 발생했습니다. 무시합니다.", ex);
            }
        }