Sha256: cffc0029ffebc6a3c95bb2106f27a0005a3f4ba71494003cd70be2a1ca8648bf

Contents?: true

Size: 405 Bytes

Versions: 1

Compression:

Stored size: 405 Bytes

Contents

class Upsert
  class Buffer
    # @private
    class SQLite3_Database < Buffer
      def ready
        return if rows.empty?
        row = rows.shift
        c = parent.connection
        c.execute %{INSERT OR IGNORE INTO #{parent.quoted_table_name} (#{row.columns_sql}) VALUES (#{row.values_sql}); UPDATE #{parent.quoted_table_name} SET #{row.set_sql} WHERE #{row.where_sql}}
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
upsert-0.4.0 lib/upsert/buffer/sqlite3_database.rb