func (sgor *ServiceGroupOracleRepository) GetServiceGroups() ([]ServiceGroup, error) {
	rows, err := sgor.Tx.Query(LIST_SERVICE_GROUP_V2)
	if err != nil {
		return []ServiceGroup{}, err
	}
	return RowsToServiceGroup(rows, false), nil
}
GetServiceGroups get list of service groups
package servicegroup
import (
	"database/sql"
	"errors"
	"strings"
	"github.com/Glintt/gAPI/api/database"
	"github.com/Glintt/gAPI/api/utils"
	"gopkg.in/mgo.v2/bson"
)
const (
	LIST_SERVICE_GROUP    = `select id, name, isreachable from gapi_services_groups`
	LIST_SERVICE_GROUP_V2 = `select a.id, a.name, a.isreachable, listagg(b.id,', ') within group(order by b.id) services from gapi_services_groups a left join gapi_services b
on b.groupid = a.id  group by (a.id, a.name, a.isreachable )`
	GET_SERVICE_GROUP_BY_ID_OR_NAME = `select a.id, a.name, a.isreachable, listagg(b.id,', ') within group(order by b.id) services from gapi_services_groups a left join gapi_services b
on b.groupid = a.id  where a.id = :id or a.name = :name group by (a.id, a.name, a.isreachable )`
	ADD_SERVICE_TO_GROUP      = `update gapi_services set groupid = :groupid where id = :id`
	REMOVE_SERVICE_FROM_GROUP = `update gapi_services set groupid = '' where id = :id`
	CREATE_SERVICE_GROUP      = `insert into gapi_services_groups(id, name, isreachable) values (:id,:name,:isreachable)`
	UPDATE_SERVICE_GROUP      = `update gapi_services_groups set name = :name, isreachable = :isreachable where id = :id`
	DELETE_SERVICE_GROUP      = `delete from gapi_services_groups where id = :id`
)
type ServiceGroupOracleRepository struct {
	Db      *sql.DB
	DbError error
	Tx      *sql.Tx
}
func (agmr *ServiceGroupOracleRepository) OpenTransaction() error {
	tx, err := agmr.Db.Begin()
	agmr.Tx = tx
	return err
}
func (agmr *ServiceGroupOracleRepository) CommitTransaction() {
	agmr.Tx.Commit()
}
func (agmr *ServiceGroupOracleRepository) RollbackTransaction() {
	agmr.Tx.Rollback()
}
func (agmr *ServiceGroupOracleRepository) Release() {
	database.CloseOracleConnection(agmr.Db)
}