-
Notifications
You must be signed in to change notification settings - Fork 84
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
dsv type option #301
base: main
Are you sure you want to change the base?
dsv type option #301
Conversation
switch (`${type}`) { | ||
case "number": return Number; | ||
case "string": return String; | ||
case "boolean": return Boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this differs from autotype in that it will not turn "false" into false
. is that ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, no, that wasn’t intentional.
} | ||
switch (`${type}`) { | ||
case "number": return Number; | ||
case "string": return String; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in autoType the string gets trimmed. probably not something to include in casting, but will be different
} | ||
|
||
function NewDate(value) { | ||
return new Date(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to do the timezone workaround for Safari?
I agree that unmentioned columns be included by default
I agree, nice to explicitly drop unwanted columns (also documents the decision nicely)
I don't think so. The primary interface for this implies that auto already suggested the type for the column. I like this level of interface being explicit.
Seems like something we want to support across the platform better right?
i agree, we should standardize. if someone wants a variation the inline function is easy to use.
I don't think so.
Don't have a strong opinion, but making it as fast as possible seems a worthy goal. |
Open questions (with my inclination):