This file contains 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
/** | |
* This file is licensed to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance with the | |
* License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This file contains 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
import javax.sql.DataSource; | |
import org.jooq.ExecuteContext; | |
import org.jooq.impl.DefaultExecuteListener; | |
import org.springframework.jdbc.datasource.DataSourceUtils; | |
import org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator; | |
import org.springframework.jdbc.support.SQLExceptionTranslator; | |
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator; |
This file contains 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
--autolibs=read-only --binary --trace 1.9.3 | |
rvm 1.19.1 (master) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] | |
+ [[ -n '' ]] | |
+ set -o errtrace | |
+ export 'PS4=+ $(date "+%s.%N") ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ PS4='+ $(date "+%s.%N") ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ 1365191040.972879771 /scripts/cli : __rvm_parse_args() 795 > [[ -z install ]] | |
+ 1365191040.974559260 /scripts/cli : __rvm_parse_args() 798 > [[ error == \i\n\s\t\a\l\l ]] |
This file contains 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
+ 1365195022.125873791 /tmp/go : 7 > rvm install --autolibs=read-only --binary --trace 1.9.3 | |
--autolibs=read-only --binary --trace 1.9.3 | |
rvm 1.19.1 (master) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] | |
+ 1365195022.205960037 /scripts/cli : __rvm_parse_args() 764 > [[ -n '' ]] | |
+ 1365195022.207334771 /scripts/cli : __rvm_parse_args() 766 > set -o errtrace | |
+ 1365195022.208645507 /scripts/cli : __rvm_parse_args() 767 > export 'PS4=+ $(date "+%s.%N") ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ 1365195022.210013205 /scripts/cli : __rvm_parse_args() 767 > PS4='+ $(date "+%s.%N") ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' |
This file contains 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
public class SpringExceptionTranslationExecuteListener | |
extends DefaultExecuteListener { | |
/** {@inheritDoc} */ | |
@Override | |
public void exception(ExecuteContext ctx) { | |
SQLException e = ctx.sqlException(); | |
if (e != null) { | |
String name = ctx.configuration().dialect().thirdParty().springDbName(); |
This file contains 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
Tables: | |
CREATE TABLE "activities" ( | |
"id" INT UNSIGNED NOT NULL AUTO_INCREMENT, | |
... | |
); | |
CREATE TABLE "interests" ( | |
"id" INT UNSIGNED NOT NULL AUTO_INCREMENT, | |
"name" VARCHAR(255) NOT NULL, |
This file contains 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
{ | |
"chat": { | |
// the list of chats may not be listed (no .read permissions here) | |
// a chat conversation | |
"$key": { | |
// if the chat hasn't been created yet, we allow read so there is a way | |
// to check this and create it; if it already exists, then authenticated | |
// user (specified by auth.id) must be in $key/users |
This file contains 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
{ | |
"chat": { | |
// the list of chats may not be listed (no .read permissions here) | |
// a chat conversation | |
"$key": { | |
// if the chat hasn't been created yet, we allow read so there is a way | |
// to check this and create it; if it already exists, then authenticated | |
// user (specified by auth.id) must be in $key/users |
This file contains 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
curl -XDELETE localhost:9200/test | |
curl -XPUT localhost:9200/test -d '{ | |
"mappings" : { | |
"type1" : { | |
"properties" : { | |
"name" : { | |
"type" : "multi_field", | |
"fields" : { | |
"name" : {"type" : "string", "index" : "analyzed"}, |
This file contains 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
curl -XDELETE localhost:9200/test | |
curl -XPUT localhost:9200/test -d '{ | |
"mappings" : { | |
"type1" : { | |
"properties" : { | |
"name" : { | |
"type" : "multi_field", | |
"fields" : { | |
"name" : {"type" : "string", "index" : "analyzed"}, |
OlderNewer