-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a User-Defined Stored Procedure to the SQLite schema #236
Open
Crazee
wants to merge
9
commits into
Expensify:main
Choose a base branch
from
Crazee:udf
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Very cool! Sorry for the slow response to the issues and questions, it's
been a crazy time. I hope to review all this soon. Thanks for you patience!
…On Jun 30, 2017 11:36 AM, "Guy Riddle" ***@***.***> wrote:
I created a Bedrock plugin *udf.so* that registers a SQLite stored
procedure called *gouda*. You can, of course, replace the definition in
*udf.c* with others that please you. It gets made via "make udf" (which
is in with my Docker build mechanism, just because). You load it by adding,
say,
-plugins udf,db,jobs,cache,mysql
to *bedrock.cfg*.
Then cheese up your SQL:
$ docker run -it --rm --net container:rock mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: bedrock e7bb200
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [bedrock]> SELECT gouda(3.1, 4.2, 1.5, 2.7) AS cheese;
+--------+
| cheese |
+--------+
| 8.97 |
+--------+
1 row in set (0.00 sec)
MySQL [bedrock]>
------------------------------
You can view, comment on, or merge this pull request online at:
#236
Commit Summary
- DCI-57 Add docker target to Makefile
- Merge remote-tracking branch 'upstream/master'
- DCI-57 Start the busybox syslogd
- Merge remote-tracking branch 'upstream/master'
- DCI-57 Parameters from bedrock.cfg
- Merge remote-tracking branch 'upstream/master'
- DCI-57 Build UDF plugin
- DCI-57 Add SQLite function gouda
File Changes
- *M* .gitignore
<https://github.com/Expensify/Bedrock/pull/236/files#diff-0> (1)
- *M* Makefile
<https://github.com/Expensify/Bedrock/pull/236/files#diff-1> (29)
- *A* docker/bedbugs/Dockerfile
<https://github.com/Expensify/Bedrock/pull/236/files#diff-2> (18)
- *A* docker/bedbugs/makeme
<https://github.com/Expensify/Bedrock/pull/236/files#diff-3> (8)
- *A* docker/bedrook/Dockerfile
<https://github.com/Expensify/Bedrock/pull/236/files#diff-4> (17)
- *A* docker/bedrook/start-bedrock
<https://github.com/Expensify/Bedrock/pull/236/files#diff-5> (26)
- *A* docker/bedrook/udf.so
<https://github.com/Expensify/Bedrock/pull/236/files#diff-6> (0)
- *M* main.cpp
<https://github.com/Expensify/Bedrock/pull/236/files#diff-7> (4)
- *A* udf.c
<https://github.com/Expensify/Bedrock/pull/236/files#diff-8> (65)
- *A* udf.so
<https://github.com/Expensify/Bedrock/pull/236/files#diff-9> (0)
- *A* udfplug.cpp
<https://github.com/Expensify/Bedrock/pull/236/files#diff-10> (23)
Patch Links:
- https://github.com/Expensify/Bedrock/pull/236.patch
- https://github.com/Expensify/Bedrock/pull/236.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#236>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjG0pa1o_xC35QniC4_sczn2972s0hvks5sJUBAgaJpZM4OK6wI>
.
|
Just assumed you were all up in the mountains catching a wild boar for the July 4th BBQ…
:G:
From: David Barrett <[email protected]<mailto:[email protected]>>
Reply-To: Expensify/Bedrock <[email protected]<mailto:[email protected]>>
Date: Friday, June 30, 2017 at 12:08 PM
To: Expensify/Bedrock <[email protected]<mailto:[email protected]>>
Subject: Re: [Expensify/Bedrock] Add a User-Defined Stored Procedure to the SQLite schema (#236)
Very cool! Sorry for the slow response to the issues and questions, it's
been a crazy time. I hope to review all this soon. Thanks for you patience!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I created a Bedrock plugin udf.so that registers a SQLite stored procedure called gouda. You can, of course, replace the definition in udf.c with others that please you. It gets made via "make udf" (which is in with my Docker build mechanism, just because). You load it by adding, say,
-plugins udf,db,jobs,cache,mysql
to bedrock.cfg.
Then cheese up your SQL: