No description, website, or topics provided.
C++
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
picojson @ 2c62720
.gitmodules
Makefile
Makefile.msc
README
mysql_address_normalize.cc

README

INSTALL

$ git clone git://github.com/yappo/mysql-address_normalize.git
$ cd mysql-address_normalize
$ g++ -lcurl -shared -fPIC -Wall -g mysql_address_normalize.cc -o mysql_address_normalize.so
$ sudo cp mysql_address_normalize.so /foo/bar/lib/mysql/plugin/
$ mysql -uroot
mysql> create function address_normalize returns string soname 'mysql_address_normalize.so';
mysql> create function address_normalize_last_region_id returns string soname 'mysql_address_normalize.so';

USAGE

  # 普通の使い方
  SELECT address_normalize('道玄坂二丁目2');

  # 住所正規化処理が正しく行えなければ NULL を返す(JSON の is_error が 1 の時)
  SELECT address_normalize('道玄坂二丁目2', 1);

  # 同時に region_id を取得したい場合
  # 必ず address_normalize() の後に実行するようにしないと正しい region_id が取得出来ない
  SELECT address_normalize('道玄坂二丁目2'), address_normalize_last_region_id();

SEE ALSO

  http://blog.yappo.jp/yappo/archives/000770.html

AUTHOR

  Kazuhiro Osawa