lxd/db/storage_pools.go
func (c *ClusterTx) StoragePoolDriver(id int64) (string, error) {
	stmt := "SELECT driver FROM storage_pools WHERE id=?"
	drivers, err := query.SelectStrings(c.tx, stmt, id)
	if err != nil {
		return "", err
	}
	switch len(drivers) {
	case 0:
		return "", ErrNoSuchObject
	case 1:
		return drivers[0], nil
	default:
		return "", fmt.Errorf("more than one pool has the given id")
	}
}
func (c *ClusterTx) StoragePoolDriver(id int64) (string, error) {
	stmt := "SELECT driver FROM storage_pools WHERE id=?"
	drivers, err := query.SelectStrings(c.tx, stmt, id)
	if err != nil {
		return "", err
	}
	switch len(drivers) {
	case 0:
		return "", ErrNoSuchObject
	case 1:
		return drivers[0], nil
	default:
		return "", fmt.Errorf("more than one pool has the given id")
	}
}
// StoragePoolDriver returns the driver of the pool with the given ID.