package services

import (
	datasql "gitlab.ost.ch/marketminds/marketminds/pkg/data/sql"
)

type Service struct {
	SqlInstance *datasql.SqlInstance
}

func NewService(sqlInstance *datasql.SqlInstance) *Service {
	return &Service{SqlInstance: sqlInstance}
}

func (s *Service) AcquireLock(lockId int) (bool, error) {
	return s.SqlInstance.AcquireLock(lockId)
}

func (s *Service) ReleaseLock(lockId int) error {
	return s.SqlInstance.ReleaseLock(lockId)
}
