@@ -706,44 +706,6 @@ def configure_connection
706
706
# https://www.sqlite.org/pragma.html#pragma_cache_size
707
707
raw_execute ( "PRAGMA cache_size = 2000" , "SCHEMA" )
708
708
end
709
-
710
- def configure_connection
711
- if @config [ :timeout ] && @config [ :retries ]
712
- raise ArgumentError , "Cannot specify both timeout and retries arguments"
713
- elsif @config [ :timeout ]
714
- # FIXME:
715
- # @raw_connection.busy_timeout(self.class.type_cast_config_to_integer(@config[:timeout]))
716
- elsif @config [ :retries ]
717
- retries = self . class . type_cast_config_to_integer ( @config [ :retries ] )
718
- raw_connection . busy_handler do |count |
719
- count <= retries
720
- end
721
- end
722
-
723
- # Enforce foreign key constraints
724
- # https://www.sqlite.org/pragma.html#pragma_foreign_keys
725
- # https://www.sqlite.org/foreignkeys.html
726
- raw_execute ( "PRAGMA foreign_keys = ON" , "SCHEMA" )
727
- unless @memory_database
728
- # Journal mode WAL allows for greater concurrency (many readers + one writer)
729
- # https://www.sqlite.org/pragma.html#pragma_journal_mode
730
- raw_execute ( "PRAGMA journal_mode = WAL" , "SCHEMA" )
731
- # Set more relaxed level of database durability
732
- # 2 = "FULL" (sync on every write), 1 = "NORMAL" (sync every 1000 written pages) and 0 = "NONE"
733
- # https://www.sqlite.org/pragma.html#pragma_synchronous
734
- raw_execute ( "PRAGMA synchronous = NORMAL" , "SCHEMA" )
735
- # Set the global memory map so all processes can share some data
736
- # https://www.sqlite.org/pragma.html#pragma_mmap_size
737
- # https://www.sqlite.org/mmap.html
738
- raw_execute ( "PRAGMA mmap_size = #{ 128 . megabytes } " , "SCHEMA" )
739
- end
740
- # Impose a limit on the WAL file to prevent unlimited growth
741
- # https://www.sqlite.org/pragma.html#pragma_journal_size_limit
742
- raw_execute ( "PRAGMA journal_size_limit = #{ 64 . megabytes } " , "SCHEMA" )
743
- # Set the local connection cache to 2000 pages
744
- # https://www.sqlite.org/pragma.html#pragma_cache_size
745
- raw_execute ( "PRAGMA cache_size = 2000" , "SCHEMA" )
746
- end
747
709
end
748
710
# DIFFERENCE: A registration here is moved down to concrete class so we are not registering part of an adapter.
749
711
end
0 commit comments