Skip to content
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

✨ index access #106

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

✨ index access #106

wants to merge 6 commits into from

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.

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