This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| require "bundler/inline" | |
| gemfile do | |
| source "https://rubygems.org" | |
| gem "rails", "7.1.3.2" | |
| end | |
| require "action_controller/railtie" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "bundler/inline" | |
| require "json" | |
| require "openssl" | |
| require "base64" | |
| gemfile { gem "ruby_event_store" } | |
| class TicketHolderEmailProvided < RubyEventStore::Event | |
| def self.encryption_schema = { email: ->(data) { data.fetch(:user_id) } } | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require "bundler/inline" | |
| require "json" | |
| require "yaml" | |
| gemfile do | |
| source "https://rubygems.org" | |
| gem "rails_event_store", "2.9.1" | |
| gem "railties", "~> 7.0.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \timing | |
| \set records 100_000_000 | |
| \set repeat 1 | |
| CREATE OR REPLACE FUNCTION mk_name (i integer, d integer) | |
| RETURNS varchar | |
| AS $$ | |
| DECLARE | |
| separator varchar := '$'; | |
| id integer := i % d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \timing | |
| \set records 1_000_000 | |
| \set repeat 10 | |
| CREATE OR REPLACE FUNCTION mk_name (i integer, d integer) | |
| RETURNS varchar | |
| AS $$ | |
| DECLARE | |
| separator varchar := '$'; | |
| id integer := i % d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE OR REPLACE FUNCTION kakadudu() RETURNS uuid AS $$ | |
| DECLARE | |
| evid uuid := gen_random_uuid(); | |
| BEGIN | |
| INSERT INTO log (evid) VALUES (evid); | |
| LISTEN kakadudu; | |
| PERFORM pg_notify('kakadudu', evid::text); | |
| RETURN evid; | |
| END; | |
| $$ LANGUAGE plpgsql; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Jira where | |
| -- data Maybe a = Nothing | Just a | |
| --instance Show Event where | |
| -- show (IssueOpened id) = "IssueOpened " ++ id | |
| -- show (IssueResolved id) = "IssueResolved " ++ id | |
| -- show (IssueClosed id) = "IssueClosed " ++ id | |
| -- show (IssueReopened id) = "IssueReopened " ++ id | |
| -- show (IssueProgressStarted id) = "IssueProgressStarted " ++ id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source "https://rubygems.org" | |
| gem "benchmark-ips" | |
| gem "rails_event_store", path: "." | |
| gem "ruby_event_store", path: "." | |
| gem "ruby_event_store-active_record", path: "." | |
| gem "rails" | |
| gem "pg" | |
| gem "childprocess" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "bundler/inline" | |
| gemfile do | |
| source "https://rubygems.org" | |
| ruby "2.7.8" # keyword-hash deprecation warnings | |
| gem "concurrent-ruby", "1.3.3" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \timing | |
| \set records 1_000_000 | |
| \set repeat 10 | |
| CREATE OR REPLACE FUNCTION mk_name (i integer, d integer) | |
| RETURNS varchar | |
| AS $$ | |
| DECLARE | |
| separator varchar := '$'; | |
| id integer := i % d; |
NewerOlder