logstash-output-jdbc 0.3.1-java → 0.3.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/logstash/outputs/jdbc.rb +7 -1
- data/spec/jdbc_spec_helper.rb +2 -2
- data/spec/outputs/jdbc_derby_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe8c75828cf4838f6cb1df9ed10a067c82686398
|
4
|
+
data.tar.gz: 49d23e6f1ef4efb45cb6becf33af21a02d41b969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 726d2e0f254e004614bbe6f21ef9baccc77b382c6afbeffbf9dfd141a378dcb7b0349032c2a9d57b63f49051313cc0c750f2bcfa6432e53c7187602ac33e49b2
|
7
|
+
data.tar.gz: 20f0098bec13c4401560fdf6ba48391dc2607302a4055a1c5c3e98e50161d7811867fd9c2db7c5dbd3e8926054d74dd0db16629a51ae6418e13427a0b0fbd191
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# logstash-output-jdbc
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/theangryangel/logstash-output-jdbc.svg?branch=
|
3
|
+
[![Build Status](https://travis-ci.org/theangryangel/logstash-output-jdbc.svg?branch=v2.x)](https://travis-ci.org/theangryangel/logstash-output-jdbc)
|
4
4
|
|
5
5
|
This plugin is provided as an external plugin and is not part of the Logstash project.
|
6
6
|
|
@@ -280,7 +280,13 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
|
280
280
|
# strftime appears to be the most reliable across drivers.
|
281
281
|
statement.setString(idx + 1, value.time.strftime(STRFTIME_FMT))
|
282
282
|
when Fixnum, Integer
|
283
|
-
|
283
|
+
# bit_length doesn't exist in the current version of ruby/jruby logstash targets
|
284
|
+
# and this seems quicker than doing some Math.log2(value < 0 ? -value : value+1).ceil shit
|
285
|
+
if value > 2147483647 or value < -2147483648
|
286
|
+
statement.setLong(idx + 1, value)
|
287
|
+
else
|
288
|
+
statement.setInt(idx + 1, value)
|
289
|
+
end
|
284
290
|
when Float
|
285
291
|
statement.setFloat(idx + 1, value)
|
286
292
|
when String
|
data/spec/jdbc_spec_helper.rb
CHANGED
@@ -31,11 +31,11 @@ RSpec.shared_context 'when outputting messages' do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
let(:jdbc_create_table) do
|
34
|
-
"CREATE table #{jdbc_test_table} (created_at datetime not null, message varchar(512) not null, message_sprintf varchar(512) not null, static_int int not null, static_bit bit not null)"
|
34
|
+
"CREATE table #{jdbc_test_table} (created_at datetime not null, message varchar(512) not null, message_sprintf varchar(512) not null, static_int int not null, static_bit bit not null, static_bigint bigint not null)"
|
35
35
|
end
|
36
36
|
|
37
37
|
let(:jdbc_statement) do
|
38
|
-
["insert into #{jdbc_test_table} (created_at, message, message_sprintf, static_int, static_bit) values(?, ?, ?, ?, ?)", '@timestamp', 'message', 'sprintf-%{message}', 1, true]
|
38
|
+
["insert into #{jdbc_test_table} (created_at, message, message_sprintf, static_int, static_bit, static_bigint) values(?, ?, ?, ?, ?, ?)", '@timestamp', 'message', 'sprintf-%{message}', 1, true, 4000881632477184]
|
39
39
|
end
|
40
40
|
|
41
41
|
let(:systemd_database_service) do
|
@@ -10,7 +10,7 @@ describe 'logstash-output-jdbc: derby', if: ENV['JDBC_DERBY_JAR'] do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
let(:jdbc_create_table) do
|
13
|
-
"CREATE table #{jdbc_test_table} (created_at timestamp not null, message varchar(512) not null, message_sprintf varchar(512) not null, static_int int not null, static_bit boolean not null)"
|
13
|
+
"CREATE table #{jdbc_test_table} (created_at timestamp not null, message varchar(512) not null, message_sprintf varchar(512) not null, static_int int not null, static_bit boolean not null, static_bigint bigint not null)"
|
14
14
|
end
|
15
15
|
|
16
16
|
let(:jdbc_settings) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-jdbc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- the_angry_angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|