def next_sequence_value(sequence_name)
      # if sequence_name is set to :autogenerated then it means that primary key will be populated by trigger
      return nil if sequence_name == AUTOGENERATED_SEQUENCE_NAME
      sequence_name = quote_table_name(sequence_name)
      sql = "SELECT #{sequence_name}.NEXTVAL id FROM dual"
      log(sql, 'SQL') { @connection.next_sequence_value(sequence_name) }
    end
def next_sequence_value(sequence_name)
      # if sequence_name is set to :autogenerated then it means that primary key will be populated by trigger
      return nil if sequence_name == AUTOGENERATED_SEQUENCE_NAME
      sequence_name = quote_table_name(sequence_name)
      sql = "SELECT #{sequence_name}.NEXTVAL id FROM dual"
      log(sql, 'SQL') { @connection.next_sequence_value(sequence_name) }
    end
Returns the next sequence value from a sequence generator. Not generally
 called directly; used by ActiveRecord to get the next primary key value
 when inserting a new database record (see #prefetch_primary_key?).