lxd/db/containers.go
func (c *Cluster) ContainerProjectAndName(id int) (string, string, error) {
	q := `
SELECT projects.name, containers.name
  FROM containers
  JOIN projects ON projects.id = containers.project_id
WHERE containers.id=?
`
	project := ""
	name := ""
	arg1 := []interface{}{id}
	arg2 := []interface{}{&project, &name}
	err := dbQueryRowScan(c.db, q, arg1, arg2)
	if err == sql.ErrNoRows {
		return "", "", ErrNoSuchObject
	}

	return project, name, err
}
func (c *Cluster) ContainerProjectAndName(id int) (string, string, error) {
	q := `
SELECT projects.name, containers.name
  FROM containers
  JOIN projects ON projects.id = containers.project_id
WHERE containers.id=?
`
	project := ""
	name := ""
	arg1 := []interface{}{id}
	arg2 := []interface{}{&project, &name}
	err := dbQueryRowScan(c.db, q, arg1, arg2)
	if err == sql.ErrNoRows {
		return "", "", ErrNoSuchObject
	}

	return project, name, err
}
// ContainerProjectAndName returns the project and the name of the container
// with the given ID.