Skip to content

Instantly share code, notes, and snippets.

SELECT *
FROM pg_settings
ORDER BY name;
@tomdcc
tomdcc / event.json
Created September 29, 2020 08:12
ProjectStructure_1_1 event
{
"rootProjectName" : "root",
"projects" : [ {
"projectPath" : ":",
"children" : [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ],
"projectDir" : {
"root" : "workspace",
"path" : ""
},
"buildFile" : {
@tomdcc
tomdcc / benchmarks-master.txt
Created September 26, 2017 05:25
PGJDBC master vs tuple class benchmarks for ProcessResultSet
# JMH 1.17.4 (released 251 days ago, please consider updating!)
# VM version: JDK 1.8.0_131, VM 25.131-b11
# VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java
# VM options: -Xmx128m -Duser=pgjdbc -Ddatabase=pgjdbc -Dpassword=pgjdbc
# Warmup: 10 iterations, 1 s each
# Measurement: 10 iterations, 1 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.postgresql.benchmark.statement.ProcessResultSet.bindExecuteFetch
@tomdcc
tomdcc / Jooq385Test.java
Created November 1, 2016 03:35
Test case showing jOOQ 3.8.5 issue with arrays of bytea
import org.jooq.DSLContext;
import org.jooq.Record1;
import org.jooq.SQLDialect;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultConfiguration;
import org.jooq.util.postgres.PostgresDataType;
import org.junit.BeforeClass;
import org.junit.Test;
import org.postgresql.ds.PGSimpleDataSource;
@tomdcc
tomdcc / build.gradle
Created September 22, 2015 07:43
Example for publishing a Gradle plugin to the plugin portal while downloading it from somewhere else
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.1"
}
}
theModule.config( function($httpProvider) {
$httpProvider.responseInterceptors.push(["$q", "$timeout", function ($q, $timeout) {
return function (promise) {
var defer = $q.defer();
$timeout(function () {
promise.then(function (data) {
defer.resolve(data);
});
}, 500);