Created
October 18, 2016 20:29
-
-
Save vaijab/16199b7cc6ffa325f7464fc9515bac15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Foo struct { | |
Name string | |
Number interface{} // Optional field | |
} | |
// SQL | |
CREATE TABLE foo ( | |
name VARCHAR(255), | |
number INTEGER // Sometimes it is actually NULL | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Foo struct { | |
Name string | |
Number int // Optional field | |
} | |
// SQL | |
CREATE TABLE foo ( | |
name VARCHAR(255), | |
number INTEGER DEFAULT 0 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment