{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/140","labels_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/140/comments","events_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/140/events","html_url":"https://github.com/mapbox/node-sqlite3/issues/140","id":14506434,"number":140,"title":"User Defined Functions?","user":{"login":"matthewkastor","id":1127586,"avatar_url":"https://avatars.githubusercontent.com/u/1127586?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewkastor","html_url":"https://github.com/matthewkastor","followers_url":"https://api.github.com/users/matthewkastor/followers","following_url":"https://api.github.com/users/matthewkastor/following{/other_user}","gists_url":"https://api.github.com/users/matthewkastor/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewkastor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewkastor/subscriptions","organizations_url":"https://api.github.com/users/matthewkastor/orgs","repos_url":"https://api.github.com/users/matthewkastor/repos","events_url":"https://api.github.com/users/matthewkastor/events{/privacy}","received_events_url":"https://api.github.com/users/matthewkastor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/node-sqlite3/labels/feature%20request","name":"feature request","color":"5BD83B"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2013-05-20T03:55:42Z","updated_at":"2015-11-18T09:50:05Z","closed_at":null,"body":"I'm looking for a way to create user functions. In PHP's binding to SQLite3 there is a way to [create functions at runtime](http://php.net/manual/en/sqlite3.createfunction.php). I'm thinking that if there were something similar in node-sqlite3 it would be awesome.\r\n\r\nI don't want to try loading an extension because that would require me to keep tabs on versions and / or incorporating a compilation step in my modules. I'd rather just define functions in the javascript and be able to hook them into SQLite for use in queries.\r\n\r\nhttp://www.sqlite.org/lang_expr.html#regexp\r\nhttp://www.sqlite.org/c3ref/create_function.html\r\n"},"comment":{"url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/comments/157660629","html_url":"https://github.com/mapbox/node-sqlite3/issues/140#issuecomment-157660629","issue_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/140","id":157660629,"user":{"login":"suchitpuri","id":344226,"avatar_url":"https://avatars.githubusercontent.com/u/344226?v=3","gravatar_id":"","url":"https://api.github.com/users/suchitpuri","html_url":"https://github.com/suchitpuri","followers_url":"https://api.github.com/users/suchitpuri/followers","following_url":"https://api.github.com/users/suchitpuri/following{/other_user}","gists_url":"https://api.github.com/users/suchitpuri/gists{/gist_id}","starred_url":"https://api.github.com/users/suchitpuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suchitpuri/subscriptions","organizations_url":"https://api.github.com/users/suchitpuri/orgs","repos_url":"https://api.github.com/users/suchitpuri/repos","events_url":"https://api.github.com/users/suchitpuri/events{/privacy}","received_events_url":"https://api.github.com/users/suchitpuri/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T09:50:05Z","updated_at":"2015-11-18T09:50:05Z","body":"When can we expect this to be merged in the master ? we are dependent on the use of REGEXP in our sqlite.\r\n\r\n@wbyoung i tried to use your branch but its giving ```Object #<Database> has no method 'registerFunction'``` , any help here will be much appreciated."}}