vinted / sql_fingerprint

Abstracts SQL query and calculates fingerprint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SqlFingerprint

Build Status

Abstracts SQL query and calculates fingerprint. Using fingerprint makes it possible to group similar queries together.

Query rewriting is based on Percona Toolkit implementation.

Usage

fingerprint = SqlFingerprint.calculate('SELECT * FROM users WHERE id=1') 

Result: dd1d44f7cffa757aad5152a27b811d6735ef6661

Installation

Add this line to your application's Gemfile:

gem 'sql_fingerprint'

Or install it yourself as:

$ gem install sql_fingerprint

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the SqlFingerprint project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

Abstracts SQL query and calculates fingerprint

License:MIT License


Languages

Language:Ruby 100.0%