浏览代码

bug fixed

xormplus 9 年之前
父节点
当前提交
c9f8855fd8
共有 5 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      mssql_dialect.go
  2. 1 1
      mysql_dialect.go
  3. 1 1
      oracle_dialect.go
  4. 1 1
      postgres_dialect.go
  5. 1 1
      sqlite3_dialect.go

+ 1 - 1
mssql_dialect.go

@@ -352,7 +352,7 @@ where a.object_id=object_id('` + tableName + `')`
 		}
 		}
 
 
 		col := new(core.Column)
 		col := new(core.Column)
-		col.Indexes = make(map[string]bool)
+		col.Indexes = make(map[string]int)
 		col.Length = maxLen
 		col.Length = maxLen
 		col.Name = strings.Trim(name, "` ")
 		col.Name = strings.Trim(name, "` ")
 
 

+ 1 - 1
mysql_dialect.go

@@ -311,7 +311,7 @@ func (db *mysql) GetColumns(tableName string) ([]string, map[string]*core.Column
 	colSeq := make([]string, 0)
 	colSeq := make([]string, 0)
 	for rows.Next() {
 	for rows.Next() {
 		col := new(core.Column)
 		col := new(core.Column)
-		col.Indexes = make(map[string]bool)
+		col.Indexes = make(map[string]int)
 
 
 		var columnName, isNullable, colType, colKey, extra string
 		var columnName, isNullable, colType, colKey, extra string
 		var colDefault *string
 		var colDefault *string

+ 1 - 1
oracle_dialect.go

@@ -692,7 +692,7 @@ func (db *oracle) GetColumns(tableName string) ([]string, map[string]*core.Colum
 	colSeq := make([]string, 0)
 	colSeq := make([]string, 0)
 	for rows.Next() {
 	for rows.Next() {
 		col := new(core.Column)
 		col := new(core.Column)
-		col.Indexes = make(map[string]bool)
+		col.Indexes = make(map[string]int)
 
 
 		var colName, colDefault, nullable, dataType, dataPrecision, dataScale *string
 		var colName, colDefault, nullable, dataType, dataPrecision, dataScale *string
 		var dataLen int
 		var dataLen int

+ 1 - 1
postgres_dialect.go

@@ -936,7 +936,7 @@ WHERE c.relkind = 'r'::char AND c.relname = $1 AND s.table_schema = $2 AND f.att
 
 
 	for rows.Next() {
 	for rows.Next() {
 		col := new(core.Column)
 		col := new(core.Column)
-		col.Indexes = make(map[string]bool)
+		col.Indexes = make(map[string]int)
 
 
 		var colName, isNullable, dataType string
 		var colName, isNullable, dataType string
 		var maxLenStr, colDefault, numPrecision, numRadix *string
 		var maxLenStr, colDefault, numPrecision, numRadix *string

+ 1 - 1
sqlite3_dialect.go

@@ -311,7 +311,7 @@ func (db *sqlite3) GetColumns(tableName string) ([]string, map[string]*core.Colu
 		colStr = reg.ReplaceAllString(colStr, ",")
 		colStr = reg.ReplaceAllString(colStr, ",")
 		fields := strings.Fields(strings.TrimSpace(colStr))
 		fields := strings.Fields(strings.TrimSpace(colStr))
 		col := new(core.Column)
 		col := new(core.Column)
-		col.Indexes = make(map[string]bool)
+		col.Indexes = make(map[string]int)
 		col.Nullable = true
 		col.Nullable = true
 		col.DefaultIsEmpty = true
 		col.DefaultIsEmpty = true
 		for idx, field := range fields {
 		for idx, field := range fields {