Giter Club home page Giter Club logo

redis_udf's Introduction

**
**  Allows data synchronization from MySQL to Redis
** Syntax for the new commands are:
** create function <function_name> returns {string|real|integer}
**                soname <name_of_shared_library>
** drop function <function_name>
**
** Each defined function may have a xxxx_init function and a xxxx_deinit
** function.  The init function should alloc memory for the function
** and tell the main function about the max length of the result
** (for string functions), number of decimals (for double functions) and
** if the result may be a null value.
** Compile:
** gcc -shared -o redis_udf.so redis_udf.c  -I "/root/mysql-src/mysql-5.5.21/include" -I "/usr/include/mysql" -fPIC libhiredis.a
** copy the lib to MySQL plugin directory
**      cp redis_udf.so /usr/lib64/mysql/plugin
** After the library is made one must notify mysqld about the new
** functions with the commands:
**      CREATE FUNCTION redis_set RETURNS INTEGER SONAME 'redis_udf.so';
**      CREATE FUNCTION redis_servers_set RETURNS INTEGER SONAME 'redis_udf.so';
**
** to drop the functions, do the following:
**      DROP FUNCTION redis_set;
**      DROP FUNCTION redis_servers_set;
**
** The CREATE FUNCTION and DROP FUNCTION update the func@mysql table.
**
**
** Usage examples:
**     select redis_servers_set('192.168.60.10',6379,'password');
**     select redis_servers_set('192.168.60.10',6379);
**     select redis_set('ro222','1121235');
**     select redis_sadd('ro222','1121235');
**     select redis_srem('ro222','1121235');
**
** Thanks to  Salvatore Sanfilippo <antirez at gmail dot com> and Pieter Noordhuis <pcnoordhuis at gmail dot com> for used hiredis C client
**

redis_udf's People

Contributors

alexfok avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.