func (s *StoragePostgres) GetRootTagID(tx *sql.Tx, ownerID int) (int, error) {
	var rootTagID int
	err := tx.QueryRow(
		"SELECT id FROM tags WHERE owner_id = $1 AND parent_id IS NULL",
		ownerID,
	).Scan(&rootTagID)
	if err != nil {
		return 0, hh.MakeInternalServerError(
			errors.Annotatef(err, "getting root tag id for the user id %d", ownerID),
		)
	}

	return rootTagID, nil
}
// GetRootTagID returns the id of the root tag for the given user.
GetRootTagID returns the id of the root tag for the given user.
// GetRootTagID returns the id of the root tag for the given user .
func (s *StoragePostgres) GetRootTagID(tx *sql.Tx, ownerID int) (int, error) {
	var rootTagID int
	err := tx.QueryRow(
		"SELECT id FROM tags WHERE owner_id = $1 AND parent_id IS NULL",
		ownerID,
	).Scan(&rootTagID)
	if err != nil {
		return 0, hh.MakeInternalServerError(
			errors.Annotatef(err, "getting root tag id for the user id %d", ownerID),
		)
	}
	return rootTagID, nil
}
func ( s * StoragePostgres ) GetRootTagID ( tx * sql . Tx , ownerID int ) ( int , error ) { var rootTagID int err := tx . QueryRow ( " " , ownerID , ) . Scan ( & rootTagID ) if err != nil { return 0 , hh . MakeInternalServerError ( errors . Annotatef ( err , " " , ownerID ) , ) } return rootTagID , nil }
GetRootTagID returns the id of the root tag for the given user.
GetRootTagID returns the id of the root tag for the given user .