internal BansheeDbConnection(string db_path) : base(db_path)
        {
            // Each cache page is about 1.5K, so 32768 pages = 49152K = 48M
            int cache_size = (TableExists("CoreTracks") && Query <long> ("SELECT COUNT(*) FROM CoreTracks") > 10000) ? 32768 : 16384;

            Execute("PRAGMA cache_size = ?", cache_size);
            Execute("PRAGMA synchronous = OFF");
            Execute("PRAGMA temp_store = MEMORY");

            // TODO didn't want this on b/c smart playlists used to rely on it, but
            // now they shouldn't b/c we have smart custom functions we use for sorting/searching.
            // See BGO #603665 for discussion about turning this back on.
            //Execute ("PRAGMA case_sensitive_like=ON");

            Log.DebugFormat("Opened SQLite (version {1}) connection to {0}", db_path, ServerVersion);

            migrator      = new BansheeDbFormatMigrator(this);
            configuration = new DatabaseConfigurationClient(this);

            if (ApplicationContext.CommandLine.Contains("debug-sql"))
            {
                Hyena.Data.Sqlite.HyenaSqliteCommand.LogAll = true;
                WarnIfCalledFromThread = ThreadAssist.MainThread;
            }
        }
        internal BansheeDbConnection (string db_path) : base (db_path)
        {
            // Each cache page is about 1.5K, so 32768 pages = 49152K = 48M
            int cache_size = (TableExists ("CoreTracks") && Query<long> ("SELECT COUNT(*) FROM CoreTracks") > 10000) ? 32768 : 16384;
            Execute ("PRAGMA cache_size = ?", cache_size);
            Execute ("PRAGMA synchronous = OFF");
            Execute ("PRAGMA temp_store = MEMORY");

            // TODO didn't want this on b/c smart playlists used to rely on it, but
            // now they shouldn't b/c we have smart custom functions we use for sorting/searching.
            // See BGO #603665 for discussion about turning this back on.
            //Execute ("PRAGMA case_sensitive_like=ON");

            Log.DebugFormat ("Opened SQLite (version {1}) connection to {0}", db_path, ServerVersion);

            migrator = new BansheeDbFormatMigrator (this);
            configuration = new DatabaseConfigurationClient (this);

            if (ApplicationContext.CommandLine.Contains ("debug-sql")) {
                Hyena.Data.Sqlite.HyenaSqliteCommand.LogAll = true;
                WarnIfCalledFromThread = ThreadAssist.MainThread;
            }
        }
        public BansheeDbConnection() : base(DatabaseFile)
        {
            // Each cache page is about 1.5K, so 32768 pages = 49152K = 48M
            int cache_size = (TableExists("CoreTracks") && Query <long> ("SELECT COUNT(*) FROM CoreTracks") > 10000) ? 32768 : 16384;

            Execute("PRAGMA cache_size = ?", cache_size);
            Execute("PRAGMA synchronous = OFF");
            Execute("PRAGMA temp_store = MEMORY");
            Execute("PRAGMA count_changes = OFF");

            // don't want this on because it breaks searching/smart playlists.  See BGO #526371
            //Execute ("PRAGMA case_sensitive_like=ON");

            Log.DebugFormat("Opened SQLite connection to {0}", DatabaseFile);

            migrator      = new BansheeDbFormatMigrator(this);
            configuration = new DatabaseConfigurationClient(this);

            if (Banshee.Base.ApplicationContext.CommandLine.Contains("debug-sql"))
            {
                Hyena.Data.Sqlite.HyenaSqliteCommand.LogAll = true;
                WarnIfCalledFromThread = Banshee.Base.ThreadAssist.MainThread;
            }
        }