README.md in fluent-plugin-mysql-prepared-statement-0.0.1 vs README.md in fluent-plugin-mysql-prepared-statement-0.0.2
- old
+ new
@@ -1,9 +1,9 @@
-[![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)
-# fluent-plugin-mysql-prepared-statement
+# 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)
+
fluent plugin mysql prepared statement query
## Installation
### td-agent(Linux)
@@ -30,11 +30,11 @@
username|user(require)
password|password(default: blank)
key_names|prepared statement value(require)
sql|running sql , prepared statement query(require)
-## Configuration Example
+## Configuration Example(select)
```
<match mysql.input>
type mysql_prepared_statement
output_tag mysql.output
@@ -61,12 +61,41 @@
```
running query =>[select * from users where id = 1 and user_name = 'toyama']
+## Configuration Example(insert)
+
+```
+<match mysql.input>
+ type mysql_prepared_statement
+ output_tag mysql.output
+ host localhost
+ database test_app_development
+ username root
+ password hogehoge
+ key_names user_name
+ sql INSERT INTO users ( user_name,created_at,updated_at) VALUES (?,now(),now())
+ flush_interval 10s
+</match>
+```
+
+Assume following input is coming:
+
+```js
+mysql.input {"id":"1", "user_name":"toyama"}
+```
+
+no output by insert or update
+
+running query =>[INSERT INTO users ( user_name,created_at,updated_at) VALUES ('toyama',now(),now())]
+
+
+
## spec
```
+bundle install
rake test
```
## Contributing