Add and update netquery code based on review discussions

This commit is contained in:
Patrick Pacher 2022-03-17 14:28:01 +01:00
parent 976c0a702e
commit c2d2064ec8
No known key found for this signature in database
GPG key ID: E8CD2DA160925A6D
9 changed files with 324 additions and 148 deletions

View file

@ -18,6 +18,7 @@ var (
TagUnixNano = "unixnano"
TagPrimaryKey = "primary"
TagAutoIncrement = "autoincrement"
TagTime = "time"
TagNotNull = "not-null"
TagNullable = "nullable"
TagTypeInt = "integer"
@ -48,6 +49,7 @@ type (
PrimaryKey bool
AutoIncrement bool
UnixNano bool
IsTime bool
}
)
@ -188,6 +190,8 @@ func applyStructFieldTag(fieldType reflect.StructField, def *ColumnDef) error {
def.Nullable = true
case TagUnixNano:
def.UnixNano = true
case TagTime:
def.IsTime = true
// basic column types
case TagTypeInt: