You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: adapter.rb
    path of file: ./repos/activerecord-jdbc-adapter/lib/arjdbc/h2
    
    the code of the file until where you have to start completion: ArJdbc.load_java_part :H2
require 'arjdbc/hsqldb/adapter'
require 'arel/visitors/h2'

module ArJdbc
  module H2
    include HSQLDB

    
    def type_to_sql(type, limit = nil, precision = nil, scale = nil)
      case type.to_sym
      when :integer
        case limit
        when 1; 'tinyint'
        when 2; 'smallint'
        when nil, 3, 4; 'int'
        when 5..8; 'bigint'
        else raise(ActiveRecordError, "No integer type has byte size #{limit}")
        end