Skip to content

Conversation

kkharji
Copy link
Owner

@kkharji kkharji commented Sep 1, 2021

Purpose

Make it possible to access sqlite.tbl operations using index access:

for example:

local kvtable = tbl("kvtable", {
  key = { "text", primary = true, required = true, unique = true },
  value = "integer",
}, db)

--- access/insert-to/remove using primary key
kvtable.a = { value = 1 }
kvtable.a = nil
--- access/update a row field value 
kvtable.a.value = 2
kvtable.a.value = nil
--- sets a key field value without creating the key first
kvtable["some key with spaces :D"].value = 4

closes #98

@kkharji kkharji force-pushed the new/index_access branch 2 times, most recently from 7a8bbb5 to ce4949f Compare September 2, 2021 04:22
@kkharji
Copy link
Owner Author

kkharji commented Sep 2, 2021

... to be continued sometime next week. reviews are welcomed.

@kkharji kkharji force-pushed the master branch 6 times, most recently from 216544e to 43f5e0c Compare September 9, 2021 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(table) query/remove/update using index access
1 participant