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

Add distinction between int 64 and int 32. #150

Merged
merged 1 commit into from
Nov 22, 2020
Merged

Add distinction between int 64 and int 32. #150

merged 1 commit into from
Nov 22, 2020

Conversation

TomMD
Copy link
Contributor

@TomMD TomMD commented Oct 9, 2020

In mostly an answer to https://williamyaoh.com/posts/2019-12-14-typesafe-db-libraries.html and my own eventual needs, here is some firming up of Int32 and Int64 support.

@TomMD
Copy link
Contributor Author

TomMD commented Oct 18, 2020

I took another pass, removing some of the cruft of the first version of this change.

Looking back at the critical blog post, things that are still unaddressed include:

it doesn’t even provide an instance for Integer

Yes, but I'm not clear on a good SQL type for integer. Even the decimal type has a limit of 16k decimal digits so the translation from Integer is going to be imperfect if we use that. I'm not sure what good options exist that won't break indexing.

Insertion/updates also feel like an afterthought, as Selda won’t even allow you to use SQL DEFAULT for columns other than autoincrementing primary keys.

Hurm, insert/update/lookup feels smooth for what is supported and like a library extension for what isn't. That' is unsurprising but won't be addressed by any one PR. Eventually perhaps we can get DELETE CASCADE and other sorts of behaviors, but perhaps I'm just startlingly uninterested in the example used in the blog.

Also adds lazy text instance.
@TomMD
Copy link
Contributor Author

TomMD commented Nov 11, 2020

Ping @valderman

@valderman
Copy link
Owner

Sorry for being slow on this; crunch time at work, so it's not been my top priority.

This seems like a good idea in general. I also agree that Integer support is very much a non-issue. I've yet to see a good case for supporting it, and portability concerns alone are enough for me to hold off on it indefinitely.

@valderman valderman merged commit d945da5 into valderman:master Nov 22, 2020
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.

None yet

2 participants