lp:~nathanlws/drizzle-interface/lua-interface

Created by Nathan Williams and last modified
Get this branch:
bzr branch lp:~nathanlws/drizzle-interface/lua-interface
Only Nathan Williams can upload to this branch. If you are Nathan Williams please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Nathan Williams
Project:
Drizzle Interfaces
Status:
Merged

Recent revisions

91. By Nathan Williams <nlw@H>

Added Lua typemaps for uint8_t* in/out and for size_t* out.

The only remaining unusable portion of Lua interface is row_free (Solution: it isn't actually needed and should be hidden from Lua's interface).

90. By Nathan Williams <nlw@H>

Pulled out all the individual bits from lua/libdrizzle.i and put them into their own files to make the layout consistent with the python.

Fixed a couple bugs in Lua's client example.

89. By Nathan Williams <nlw@H>

Cleaned up the Lua interface / typemap file a bit.

Further refined the "exception" that gets passed back to Lua and updated the client example to use this.

88. By Nathan Williams <nlw@H>

Revereted D_exception to take the exception code and message again. Realized I could do what I wanted without needing to modify it.

Made the custom typemaps in Lua consistent with the rest of SWIG concerning NULL pushing nil (and not an empty string).

Updated the error reporting in Lua examples.

87. By Nathan Williams <nlw@H>

Added row_current wrapper to result_client_unbuffered.

Made the size_t* typemaps for Lua not so generic. Added typemaps to handle functions returning non-null terminated strings.

Updated Lua client example and tested all combinations of querys, buffering, and options.

86. By Nathan Williams <nlw@H>

Moved field_buffer and field_read into the exception throwing portion so they now behave like the other read/buffer wrappers.

Added max_size to the wrapped column functions.

Added Lua typemaps for size_t* that create temporaries to pass to the functions expecting them and then return them to script (using multiple return values).

Added return value (drizzle_return_t) to the D_exception wrapper/macro. I see this as temporary until all error codes are mapped to the DrizzleException enums.

Added a more fleshed out Lua exception mechanism that behaves mostly like standard Lua errors (returns nil first and then error information).

Fleshed out and better handled errors in Lua's client example.

85. By Nathan Williams <nlw@H>

Fixed error handling in Lua simple and simple_multi examples.

Mocked out client example, though quite a few typemaps are need for it to be fully functional

84. By Nathan Williams <nlw@H>

Ported simple_multi example from libdrizzle.

Made bit_test method more SWIG like in how it handles and reports invalid arguments and errors.

Added a couple tweaks to Lua interface for catching errors and handling string/length input.

83. By Nathan Williams <nlw@H>

Removed drizzle_return typedef from interface definition. Appeared to be duplicated and not providing any benefit instead of just using void. Was also suppressing useful return codes from being passed to scripts. Updated the handful of areas that was using it to just use drizzle_return_t.

Added functionality to Lua interface:
  - New tyepmap for char** returned from row_next which fills and returns a table
  - Added a basic implementation of D_exception, which will leave the message on the top of the stack to be printed out
  - Added a function to the module, bit_test, to be used to test bitwise flags which makes options(), capabilities(), etc usable with stock Lua

Finished Lua's simple example.

82. By Nathan Williams <nlw@H>

Modified Lua interface to install to the "standard" location (<foo>/lua/5.1/ instead of just <foo>/lua).

Added a couple typemaps to the lua interface.

Added an examples directory and ported the libdrizzle simple example to Lua. Output is as expected.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar RepositoryFormatKnitPack5 (bzr 1.6)
Stacked on:
lp:drizzle-interface
This branch contains Public information 
Everyone can see this information.

Subscribers