Commit Graph

4 Commits (47ea5383fd490400be57406e82acbc9018393238)

Author SHA1 Message Date
Kenneth Shaw 18135fa650 Adding unit test for VTable Insert/Update/Delete 2017-04-07 14:23:08 +07:00
Kenneth Shaw b8936b7ad3 Adding hook to vhook to allow vtables to be modified
This commit changes the vtable 'xUpdate' goModule field to a new
'cXUpdate' callback function which in turns calls a 'goVUpdate'
callback.

This new callback allows Go defined virtual table implementations
satisfying the VTabUpdater interface (also newly defined) a way to
delete/insert/update rows in a VTab.

Additionally, an anonymous interface is used within the goVUpdate
callback looking for 'TableName() string' which, when defined on a VTab
is used to provide a better contextual error message to end users if the
VTab is read only.

Care was taken to follow existing code style/conventions for this
addition, and for backwards-compatibility with existing VTab
implementations (hence why a new interface was required).
2017-03-24 15:35:33 +07:00
Yasuhiro Matsumoto 835dea39a6 vtable is not default 2017-03-05 22:18:56 +09:00
Yasuhiro Matsumoto 32ab0d8730 refactoring 2017-03-05 22:16:51 +09:00