@@ -19,7 +19,7 @@ import (
1919 "xorm.io/xorm/schemas"
2020)
2121
22- type fixtureItem struct {
22+ type FixtureItem struct {
2323 fileFullPath string
2424 tableName string
2525
@@ -35,7 +35,7 @@ type fixturesLoaderInternal struct {
3535 xormTableNames map [string ]bool
3636 db * sql.DB
3737 dbType schemas.DBType
38- fixtures map [string ]* fixtureItem
38+ fixtures map [string ]* FixtureItem
3939 quoteObject func (string ) string
4040 paramPlaceholder func (idx int ) string
4141}
@@ -64,7 +64,7 @@ func (f *fixturesLoaderInternal) preprocessFixtureRow(row []map[string]any) (err
6464 return nil
6565}
6666
67- func (f * fixturesLoaderInternal ) prepareFixtureItem (fixture * fixtureItem ) (err error ) {
67+ func (f * fixturesLoaderInternal ) prepareFixtureItem (fixture * FixtureItem ) (err error ) {
6868 fixture .tableNameQuoted = f .quoteObject (fixture .tableName )
6969
7070 if f .dbType == schemas .MSSQL {
@@ -113,7 +113,7 @@ func (f *fixturesLoaderInternal) prepareFixtureItem(fixture *fixtureItem) (err e
113113 return nil
114114}
115115
116- func (f * fixturesLoaderInternal ) loadFixtures (tx * sql.Tx , fixture * fixtureItem ) (err error ) {
116+ func (f * fixturesLoaderInternal ) loadFixtures (tx * sql.Tx , fixture * FixtureItem ) (err error ) {
117117 if fixture .tableNameQuoted == "" {
118118 if err = f .prepareFixtureItem (fixture ); err != nil {
119119 return err
@@ -167,7 +167,7 @@ func (f *fixturesLoaderInternal) Load() error {
167167 return nil
168168}
169169
170- func FixturesFileFullPaths (dir string , files []string ) (map [string ]* fixtureItem , error ) {
170+ func FixturesFileFullPaths (dir string , files []string ) (map [string ]* FixtureItem , error ) {
171171 if files != nil && len (files ) == 0 {
172172 return nil , nil // load nothing
173173 }
@@ -181,14 +181,14 @@ func FixturesFileFullPaths(dir string, files []string) (map[string]*fixtureItem,
181181 files = append (files , e .Name ())
182182 }
183183 }
184- fixtureItems := map [string ]* fixtureItem {}
184+ fixtureItems := map [string ]* FixtureItem {}
185185 for _ , file := range files {
186186 fileFillPath := file
187187 if ! filepath .IsAbs (fileFillPath ) {
188188 fileFillPath = filepath .Join (dir , file )
189189 }
190190 tableName , _ , _ := strings .Cut (filepath .Base (file ), "." )
191- fixtureItems [tableName ] = & fixtureItem {fileFullPath : fileFillPath , tableName : tableName }
191+ fixtureItems [tableName ] = & FixtureItem {fileFullPath : fileFillPath , tableName : tableName }
192192 }
193193 return fixtureItems , nil
194194}
0 commit comments