(table ...string)
| 161 | } |
| 162 | |
| 163 | func createInitTable(table ...string) (name string) { |
| 164 | name = createTable(table...) |
| 165 | array := garray.New(true) |
| 166 | for i := 1; i <= TableSize; i++ { |
| 167 | array.Append(g.Map{ |
| 168 | "id": i, |
| 169 | "account_name": fmt.Sprintf(`name_%d`, i), |
| 170 | "pwd_reset": 0, |
| 171 | "attr_index": i, |
| 172 | "created_time": gtime.Now(), |
| 173 | }) |
| 174 | } |
| 175 | result, err := db.Schema(TestDBName).Insert(context.Background(), name, array.Slice()) |
| 176 | gtest.AssertNil(err) |
| 177 | |
| 178 | n, e := result.RowsAffected() |
| 179 | gtest.Assert(e, nil) |
| 180 | gtest.Assert(n, TableSize) |
| 181 | return |
| 182 | } |
| 183 | |
| 184 | func createTableFalse(table ...string) (name string, err error) { |
| 185 | if len(table) > 0 { |
no test coverage detected
searching dependent graphs…