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
| (ns consolidation.main | |
| (:gen-cla |
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 table users ( | |
| id serial primary key | |
| ); | |
| create table profiles ( | |
| id serial primary key, | |
| user_id integer not null references users(id) | |
| ); | |
| insert into users |
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 table goods ( | |
| id serial primary key, | |
| title text not null, | |
| created_at timestamptz not null default current_timestamp | |
| ); | |
| insert into goods(title) | |
| select | |
| format('good_%s', x) |
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 table tree( | |
| id text primary key, | |
| parent_id text null | |
| ); | |
| insert into tree values | |
| ('a', null), | |
| ('b', 'a'), | |
| ('c', 'a'), | |
| ('d', 'b'), |
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
| cat ${agg_file} | sed \ | |
| -e "s/\"/'/g" -e 's/: /, /g' \ | |
| -e 's/{/jsonb_build_object(/g' \ | |
| -e 's/}/\)/g' \ | |
| -e 's/\[/jsonb_build_array(/g' \ | |
| -e 's/\]/)/g' |
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 '[clojure.zip :as zip]) | |
| (defn ->zipper [data] | |
| (zip/zipper (fn [[_ x]] | |
| (coll? x)) | |
| (fn [[_ x]] | |
| (if (map? x) | |
| (seq x) | |
| (map vector (range) x))) | |
| nil |
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
| {:clojure.main/message | |
| "Syntax error macroexpanding clojure.core/ns at (runner/bla.clj:1:1).\nNo such file or directory\n", | |
| :clojure.main/triage | |
| {:clojure.error/phase :macro-syntax-check, | |
| :clojure.error/line 1, | |
| :clojure.error/column 1, | |
| :clojure.error/source "bla.clj", | |
| :clojure.error/symbol clojure.core/ns, | |
| :clojure.error/path "runner/bla.clj", | |
| :clojure.error/class java.io.IOException, |
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
| ;; https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html | |
| ;; https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html | |
| ;; https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html | |
| (ns lambda.main | |
| (:require | |
| [lambda.log :as log] | |
| [lambda.api :as api] | |
| [lambda.error :as e]) | |
| (:import |
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
| Test Summary | |
| pg.client-test 334 ms | |
| test-client-test-poll-updates 95 ms | |
| Tested 1 namespaces in 334 ms | |
| Ran 20 assertions, in 5 test functions | |
| 5 failures | |
| 3 errors | |
| cider-test-fail-fast: t |
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
| (ns pg.demo-meetup | |
| (:require | |
| [clojure.java.io :as io] | |
| [pg.core :as pg] | |
| [pg.ssl :as ssl])) | |
| (def config | |
| {:host "127.0.0.1" | |
| :port 10140 |
NewerOlder