I hereby claim:
- I am dmitrytsepelev on github.
- I am dmitrytsepelev (https://keybase.io/dmitrytsepelev) on keybase.
- I have a public key ASCvlREEdfDPEEL7a-fQeYcDJ87nLl0XS8PmY-Sk-tGQ7Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
) | |
func getInputData() *[]int { |
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
gem "graphql" | |
end | |
class BaseObject < GraphQL::Schema::Object | |
end |
How to run examples:
$ createdb railstestdb
to create DB$ ruby demo.rb
class GraphqlController < ApplicationController | |
include EnsureHash | |
def execute | |
result = GraphqlSchema.execute( | |
params[:query], | |
variables: ensure_hash(params[:variables]), | |
context: context, | |
operation_name: params[:operationName], | |
) |
ActiveRecord::Migration.remove_foreign_key(:current_table, :foreign_table) # no lock | |
ActiveRecord::Migration.add_column(:current_table, :column_bigint, :bigint) # no lock | |
copy_data = lambda do | |
CurrentTable.where(column_bigint: nil).where.not(column: nil).in_batches do |batch| | |
batch.update_all("column_bigint = column") | |
end | |
end |
How to run examples: