You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: files.go
    path of file: ./repos/quickshare/src/db/rdb/base
    
    the code of the file until where you have to start completion: package base

import (
	"context"
	"database/sql"
	"encoding/json"
	"errors"
	"fmt"
	"path"
	"strings"

	"github.com/ihexxa/quickshare/src/db"
)

func (st *BaseStore) getFileInfo(ctx context.Context, tx *sql.Tx, itemPath string) (*db.FileInfo, error) {
	var infoStr string
	fInfo := &db.FileInfo{}
	var id uint64
	var isDir bool
	var size int64
	var sha
    
func (st *BaseStore) addFileInfo(ctx context.Context, tx *sql.Tx, infoId, userId uint64, itemPath string, info *db.FileInfo) error {
	infoStr, err := json.Marshal(info)
	if err != nil {
		return err
	}

	location, err := getLocation(itemPath)
	if err != nil {
		return err
	}

	dirPath, itemName := path.Split(itemPath)
	_, err = tx.ExecContext(
		ctx,
		`insert into t_file_info (
			id, path, user, location, parent, name,
			is_dir, size, share_id, info
		)
		values (
			?, ?, ?, ?, ?, ?,
			?, ?, ?, ?
		)`,
		infoId, itemPath, userId, location, dirPath, itemName,
		info.IsDir, info.Size, info.ShareID, infoStr,
	)
	return err
}