Skip to content

better support for boolean and lua tables #11

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

Closed
kkharji opened this issue Jan 7, 2021 · 1 comment · Fixed by #35
Closed

better support for boolean and lua tables #11

kkharji opened this issue Jan 7, 2021 · 1 comment · Fixed by #35
Labels
enhancement New feature or request

Comments

@kkharji
Copy link
Owner

kkharji commented Jan 7, 2021

Currently sql.nvim uses the following for interoping lua boolean to 0/1.

-- lua/sql.lua
local booleansql = function(value)
 if type(value) == "boolean" then
   value = (value == true) and 1 or 0
 end
 return value
end

However there are no support for interop 0/1 back to lua boolean. This aspect
should be handled in stmt module with the above code removed from sql:eval.

@kkharji
Copy link
Owner Author

kkharji commented Jan 8, 2021

sql.insert doesn't seem to interop boolean values.

@kkharji kkharji added the enhancement New feature or request label Jan 9, 2021
@kkharji kkharji changed the title better support for boolean interop better support for boolean and lua tables Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant