fluent-plugin-mysql-prepared-statement 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36b7b4e0e20491c685d81a00ee719c2cfa079177
|
4
|
+
data.tar.gz: 540dc9706eab4677ee1d1da5f6ea80a40045297b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e62bfe2ea124fdb7a679e866ac7bfb8b8d9f6cb46ee5aa59e5d6532211fe16e8422d655d47c70dc3620f71ea1a5dc421295a4861909efbb474829d99a6964d24
|
7
|
+
data.tar.gz: 5158d842b7b02b9a6497959e4396562cf014911587d7c878eea19d9f00fd82d7d604d2c5d07b9c9268e7b100bd6781dbf6926701cd732adf2f356d257baf3e1f
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
[](http://travis-ci.org/toyama0919/fluent-plugin-mysql-prepared-statement)
|
2
1
|
|
3
|
-
# fluent-plugin-mysql-prepared-statement
|
2
|
+
# fluent-plugin-mysql-prepared-statement [](http://travis-ci.org/toyama0919/fluent-plugin-mysql-prepared-statement)
|
3
|
+
|
4
4
|
|
5
5
|
fluent plugin mysql prepared statement query
|
6
6
|
|
@@ -32,7 +32,7 @@ password|password(default: blank)
|
|
32
32
|
key_names|prepared statement value(require)
|
33
33
|
sql|running sql , prepared statement query(require)
|
34
34
|
|
35
|
-
## Configuration Example
|
35
|
+
## Configuration Example(select)
|
36
36
|
|
37
37
|
```
|
38
38
|
<match mysql.input>
|
@@ -63,9 +63,38 @@ mysql.output {"id":122,"user_name":"toyama","created_at":"2014-01-01 19:10:27 +0
|
|
63
63
|
running query =>[select * from users where id = 1 and user_name = 'toyama']
|
64
64
|
|
65
65
|
|
66
|
+
## Configuration Example(insert)
|
67
|
+
|
68
|
+
```
|
69
|
+
<match mysql.input>
|
70
|
+
type mysql_prepared_statement
|
71
|
+
output_tag mysql.output
|
72
|
+
host localhost
|
73
|
+
database test_app_development
|
74
|
+
username root
|
75
|
+
password hogehoge
|
76
|
+
key_names user_name
|
77
|
+
sql INSERT INTO users ( user_name,created_at,updated_at) VALUES (?,now(),now())
|
78
|
+
flush_interval 10s
|
79
|
+
</match>
|
80
|
+
```
|
81
|
+
|
82
|
+
Assume following input is coming:
|
83
|
+
|
84
|
+
```js
|
85
|
+
mysql.input {"id":"1", "user_name":"toyama"}
|
86
|
+
```
|
87
|
+
|
88
|
+
no output by insert or update
|
89
|
+
|
90
|
+
running query =>[INSERT INTO users ( user_name,created_at,updated_at) VALUES ('toyama',now(),now())]
|
91
|
+
|
92
|
+
|
93
|
+
|
66
94
|
## spec
|
67
95
|
|
68
96
|
```
|
97
|
+
bundle install
|
69
98
|
rake test
|
70
99
|
```
|
71
100
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |gem|
|
3
3
|
gem.name = "fluent-plugin-mysql-prepared-statement"
|
4
|
-
gem.version = "0.0.
|
5
|
-
gem.authors = ["Toyama
|
4
|
+
gem.version = "0.0.2"
|
5
|
+
gem.authors = ["Hiroshi Toyama"]
|
6
6
|
gem.email = ["toyama0919@gmail.com"]
|
7
7
|
gem.description = %q{fluent plugin mysql prepared statement}
|
8
8
|
gem.summary = %q{fluent plugin mysql prepared statement}
|
@@ -44,7 +44,6 @@ module Fluent
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def start
|
47
|
-
@handler = client
|
48
47
|
super
|
49
48
|
end
|
50
49
|
|
@@ -68,6 +67,7 @@ module Fluent
|
|
68
67
|
end
|
69
68
|
|
70
69
|
def write(chunk)
|
70
|
+
@handler = client
|
71
71
|
$log.info "adding mysql_query job: "
|
72
72
|
chunk.msgpack_each { |tag, time, data|
|
73
73
|
results = get_exec_result(data)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-mysql-prepared-statement
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Toyama
|
7
|
+
- Hiroshi Toyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -118,7 +118,7 @@ files:
|
|
118
118
|
- ".gitignore"
|
119
119
|
- ".travis.yml"
|
120
120
|
- Gemfile
|
121
|
-
- LICENSE
|
121
|
+
- LICENSE
|
122
122
|
- README.md
|
123
123
|
- Rakefile
|
124
124
|
- fluent-plugin-mysql-prepared-statement.gemspec
|