fluent-plugin-mysql-prepared-statement 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37ea1313b1c63e4709f63a66b64872c119fbd0c0
4
- data.tar.gz: c47c9aca3bb7cfff68215769acb2ae4a8e82117a
3
+ metadata.gz: 36b7b4e0e20491c685d81a00ee719c2cfa079177
4
+ data.tar.gz: 540dc9706eab4677ee1d1da5f6ea80a40045297b
5
5
  SHA512:
6
- metadata.gz: 0e8e7846a2f4b3d3e798a174c99b7dbca48baf30199af91442af1ef2a109b6ce25699f061cc2825835b4c54f91a10ae95b5352faa35510cda15cff0ab95dffa5
7
- data.tar.gz: 98d1d3520c5a4ac8241df342e6de8c925baa8307d52405a6aec07547e561aa37e91c2688a5cd35f45f30ba032e2ae2000063b72acf3eabd29fd1b1a0e573b8c3
6
+ metadata.gz: e62bfe2ea124fdb7a679e866ac7bfb8b8d9f6cb46ee5aa59e5d6532211fe16e8422d655d47c70dc3620f71ea1a5dc421295a4861909efbb474829d99a6964d24
7
+ data.tar.gz: 5158d842b7b02b9a6497959e4396562cf014911587d7c878eea19d9f00fd82d7d604d2c5d07b9c9268e7b100bd6781dbf6926701cd732adf2f356d257baf3e1f
File without changes
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- [![Build Status](https://secure.travis-ci.org/toyama0919/fluent-plugin-mysql-prepared-statement.png?branch=master)](http://travis-ci.org/toyama0919/fluent-plugin-mysql-prepared-statement)
2
1
 
3
- # fluent-plugin-mysql-prepared-statement
2
+ # fluent-plugin-mysql-prepared-statement [![Build Status](https://secure.travis-ci.org/toyama0919/fluent-plugin-mysql-prepared-statement.png?branch=master)](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.1"
5
- gem.authors = ["Toyama Hiroshi"]
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.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - Toyama Hiroshi
7
+ - Hiroshi Toyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-02 00:00:00.000000000 Z
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.txt
121
+ - LICENSE
122
122
  - README.md
123
123
  - Rakefile
124
124
  - fluent-plugin-mysql-prepared-statement.gemspec