@@ -167,7 +167,7 @@ func (f *FileStore) AddAppVersionDisk(ctx context.Context, tx types.Transaction,
167167 return nil
168168}
169169
170- func (f * FileStore ) GetFileByShaTx (sha string ) ([]byte , string , error ) {
170+ func (f * FileStore ) GetFileBySha (sha string ) ([]byte , string , error ) {
171171 var tx types.Transaction
172172 if f .initTx .IsInitialized () {
173173 tx = f .initTx
@@ -180,11 +180,11 @@ func (f *FileStore) GetFileByShaTx(sha string) ([]byte, string, error) {
180180 defer tx .Rollback ()
181181 }
182182
183- return f .GetFileBySha (context .Background (), tx , sha )
183+ return f .GetFileByShaTx (context .Background (), tx , sha )
184184}
185185
186- func (f * FileStore ) GetFileBySha (ctx context.Context , tx types.Transaction , sha string ) ([]byte , string , error ) {
187- stmt , err := tx .PrepareContext (ctx , system .RebindQuery (f .metadata .dbType , "SELECT compression_type , content FROM files where sha = ?" ))
186+ func (f * FileStore ) GetFileByShaTx (ctx context.Context , tx types.Transaction , sha string ) ([]byte , string , error ) {
187+ stmt , err := tx .PrepareContext (ctx , system .RebindQuery (f .metadata .dbType , "SELECT compression_type, content FROM files where sha = ?" ))
188188 if err != nil {
189189 return nil , "" , fmt .Errorf ("error preparing statement: %w" , err )
190190 }
@@ -200,7 +200,7 @@ func (f *FileStore) GetFileBySha(ctx context.Context, tx types.Transaction, sha
200200 return content , compressionType , nil
201201}
202202
203- func (f * FileStore ) getFileInfoTx () (map [string ]DbFileInfo , error ) {
203+ func (f * FileStore ) getFileInfo () (map [string ]DbFileInfo , error ) {
204204 var tx types.Transaction
205205 if f .initTx .IsInitialized () {
206206 tx = f .initTx
@@ -212,10 +212,10 @@ func (f *FileStore) getFileInfoTx() (map[string]DbFileInfo, error) {
212212 }
213213 defer tx .Rollback ()
214214 }
215- return f .getFileInfo (context .Background (), tx )
215+ return f .getFileInfoTx (context .Background (), tx )
216216}
217217
218- func (f * FileStore ) getFileInfo (ctx context.Context , tx types.Transaction ) (map [string ]DbFileInfo , error ) {
218+ func (f * FileStore ) getFileInfoTx (ctx context.Context , tx types.Transaction ) (map [string ]DbFileInfo , error ) {
219219 stmt , err := tx .PrepareContext (ctx , system .RebindQuery (f .metadata .dbType , `select name, sha, uncompressed_size, create_time from app_files where appid = ? and version = ?` ))
220220 if err != nil {
221221 return nil , fmt .Errorf ("error preparing statement: %w" , err )
@@ -362,7 +362,7 @@ func (f *FileStore) GetAppVersion(ctx context.Context, tx types.Transaction, ver
362362}
363363
364364func (f * FileStore ) GetAppFiles (ctx context.Context , tx types.Transaction ) ([]types.AppFile , error ) {
365- files , err := f .getFileInfo (ctx , tx )
365+ files , err := f .getFileInfoTx (ctx , tx )
366366 if err != nil {
367367 return nil , err
368368 }
0 commit comments