Find in Path.. functionality to find a word across multiple files, file masks can be used to match certain types of files. For example, using *.rb will only look through Ruby files. On the other hand, if you want to exclude Ruby files instead, you can add an ! at the front (i.e. !*.rb).
Here are other useful examples/combinations:
all files excluding spec tests: !*spec.rb
all Ruby files excluding spec tests: *.rb,!*spec.rb
Warning: This only works for PostgreSQL 9.5+
Given the following:
a users table:
users table only has 1 user with values:
- id: 1
- name: Alejandro
- created_at: '2010-10-10 10:00:00.000000'
- updated_at: '2010-10-10 10:00:00.000000'
You can upsert using the following SQL query:
users(id, name, created_at, updated_at)
(1, 'Alexander', NOW(), NOW()),
(2, 'Belle', NOW(), NOW())
ON CONFLICT (id)
DO UPDATE SET
- User(id=1) will be renamed from Alejandro to Alexander. The updated_at value will be set to current time.
- User(id=2) will be inserted to users table with name = Belle, and both created_at and updated_at will be set to current time.
bundle console [GROUP]
runs Ruby console with bundled gems