mirror of
https://github.com/safing/portmaster
synced 2025-09-12 15:59:39 +00:00
Add and update netquery code based on review discussions
This commit is contained in:
parent
976c0a702e
commit
c2d2064ec8
9 changed files with 324 additions and 148 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue