Skip to content

Instantly share code, notes, and snippets.

@briandignan
briandignan / save_restore_dependencies.sql
Last active April 1, 2024 02:13 — forked from claudep/save_restore_dependencies.sql
Changed types for compatibility with PG12. Added save/restore for indexes/rules
create table if not exists deps_saved_ddl
(
deps_id serial primary key,
deps_view_schema name,
deps_view_name name,
deps_ddl_to_run text
);
create or replace function deps_save_and_drop_dependencies(p_view_schema name, p_view_name name) returns void as
$$
@briandignan
briandignan / SampleJSON.txt
Last active December 22, 2022 00:43
Sending a nested Go struct as JSON over a WebSocket to JavaScript
{
"Channel": {
"AddNodes": [
"node1",
"node2"
]
}
}
@briandignan
briandignan / Record.java
Created August 28, 2013 14:33
The set of classes that I use to represent SOAP query results and CSV files in a common format so they can easily be converted from one to the other. It's especially useful when doing unit tests where I need to mock out a Cisco CallManager SOAP query resultset.
package mil.nga.common.db;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import net.jcip.annotations.Immutable;