Benign ruby 934 installs Download

activerecord-virgodb-adapter 0.1.0.dev.1424cbd

“Lets any Rails app write real ActiveRecord::Migration subclasses against a virgodb manifest, picked up by `rails db:migrate` the same way S…”

Ruby parses JSON dataRuby serializes formatted JSON
SHA-256e1f797170a48f95cbe371ff6ce8b2dd5abd930f85323469455e80926e734a27c
MaleculeH₂(Db₂F)

Evidence

ClickHouse OLAP database reference lines 1–12
1# frozen_string_literal: true
2
3require "active_record/connection_adapters/sqlite3_adapter"
4require "json"
5
6module ActiveRecord
7 module ConnectionAdapters
8 # ActiveRecord adapter for virgodb migrations -- lets any Rails app
9 # define and evolve a virgodb table's schema the same way it already
10 # does for SQLite (bin/rails db:migrate) and ClickHouse (the
11 # clickhouse-activerecord gem): real ActiveRecord::Migration subclasses,
12 # raw type strings, picked up by `rails d …
English function-word token "this" lines 33–35
33:49… oped by `table_name`
34 # specifically to make this safe: each logical table's schema history
35 # and physical run files stay independent even th …
SQL SELECT syntax reference lines 160–165
160:13… re_schema_versions_table!
161
162 current_json = select_value("SELECT columns FROM schema_versions WHERE table_name = #{quote(table_name)} ORDER BY version DESC LIMIT 1")
163 current_cols = current_json ? JSON.parse(current_json) : []
164
165 new_col = { "name" => column_name.to_s, "virgodb_type" => type.to_s, "nullable" => options[:null] != …
Ruby serializes formatted JSON lines 286–289
286:115… b/migrate_virgodb_*/ for the rest"
287 pretty_columns = JSON.pretty_generate(JSON.parse(latest["columns"]))
288 f.puts(
289 "INSERT INTO \"schema_versions\" (id, table_name, version, columns, applied_ …
Writes file content with Ruby File.write lines 323–330
323
324 "#{comment}\n#{statement_start}"
325 end
326 File.write(filename, content)
327 end
328
329 # `SQLite3Adapter#structure_dump`'s raw `SELECT sql FROM sqlite_master`
330 # path (used …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.