diff --git a/core/split.go b/core/split.go index 97e27ac..a2ac3ad 100644 --- a/core/split.go +++ b/core/split.go @@ -110,3 +110,18 @@ func SplitSQLStatements(r io.Reader, prefix string) []string { return stmts } + +var SplitXORM = &TagSplit{ + Prefix: "xorm", + Split: TagSplitForXORM, +} + +var SplitDB = &TagSplit{ + Prefix: "db", + Split: TagSplitForDb, +} + +type TagSplit struct { + Prefix string + Split func(s string, fieldName string) []string +} \ No newline at end of file diff --git a/gobatis.go b/gobatis.go index b86c3b5..db52ff7 100644 --- a/gobatis.go +++ b/gobatis.go @@ -70,6 +70,10 @@ type Nullable = core.Nullable type Error = core.Error type SqlError = core.SqlError +var SplitXORM = core.SplitXORM +var SplitDB = core.SplitDB +type TagSplit = core.TagSplit + const ( OdbcPrefix = "odbc_with_"