Skip to content

Commit

Permalink
Merge branch 'feature/1_Lua_prototype' of https://github.com/exasol/r…
Browse files Browse the repository at this point in the history
…ow-level-security-lua.git into feature/1_Lua_prototypy
  • Loading branch information
redcatbear committed Sep 2, 2020
2 parents 7a97104 + f60a22e commit 94f8096
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Findings.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Prototype findings

* `CREATE OR REPLACE LUA ADAPTER SCRIPT` does not work. Code seems cached. Requires dropping the script an recreating it.
* `CREATE OR REPLACE LUA ADAPTER SCRIPT` does not work. Code seems cached. Requires dropping the script and recreating it.
3 changes: 1 addition & 2 deletions doc/developer_guide/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ Most of those packages are only required for testing. While `cjson` is needed at

### Bundling the Main Script and the Modules

As most non-trivial pieces of software, `row-level-security-lua` is modularized. While it is possible to install individual modules as Lua scripts in Exasol, this is also a lot of work. And the more modules you install individually, the higher the chances you forget to update one of them. A safer and more convenient way is to bundly everything into one script before the installation using [lua-amalg](https://github.com/siffiejoe/lua-amalg/).
As most non-trivial pieces of software, `row-level-security-lua` is modularized. While it is possible to install individual modules as Lua scripts in Exasol, this is also a lot of work. And the more modules you install individually, the higher the chances you forget to update one of them. A safer and more convenient way is to bundle everything into one script before the installation using [lua-amalg](https://github.com/siffiejoe/lua-amalg/).

To make this process easier, the [Maven POM file](../../pom.xml) contains an execution that automates this step. Still it is necessary to add new modules by hand in the list of modules to be bundled in the POM.

Note that the entry point `request_dispatcher.lua` is a regular Lua script that must be added to the bundle using the `-s` switch and its relative path. The remaining bundle elements are Lua modules and must be listed in dot-notation.

4 changes: 2 additions & 2 deletions src/main/lua/exasollog/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local socket = require("socket")
-- first time.
-- </p>
-- <p>
-- You can use a high resolution timer. Note that this are <p>not</p> the sub-second units of the timestamp! Lua
-- You can use a high resolution timer. Note that these are <p>not</p> the sub-second units of the timestamp! Lua
-- timestamps only offer second resolution. Rather you get a time difference in milliseconds counted from the first time
-- the log is opened.
--
Expand Down Expand Up @@ -129,7 +129,7 @@ function M.set_level(level_name)
end

---
-- Write to a socket, print or discard message.
-- Write to a socket, print or discard the message.
-- <p>
-- If a socket connection is established, this method writes to that socket. Otherwise if the global print function
-- exists (e.g. in a unit test) falls back to logging via <code>print()</code>.
Expand Down

0 comments on commit 94f8096

Please sign in to comment.