lxd/db/cluster/query.go
func selectNodesVersions(tx *sql.Tx) ([][2]int, error) {
	versions := [][2]int{}

	dest := func(i int) []interface{} {
		versions = append(versions, [2]int{})
		return []interface{}{&versions[i][0], &versions[i][1]}
	}

	stmt, err := tx.Prepare("SELECT schema, api_extensions FROM nodes")
	if err != nil {
		return nil, err
	}
	defer stmt.Close()
	err = query.SelectObjects(stmt, dest)
	if err != nil {
		return nil, err
	}
	return versions, nil
}
func selectNodesVersions(tx *sql.Tx) ([][2]int, error) {
	versions := [][2]int{}

	dest := func(i int) []interface{} {
		versions = append(versions, [2]int{})
		return []interface{}{&versions[i][0], &versions[i][1]}
	}

	stmt, err := tx.Prepare("SELECT schema, api_extensions FROM nodes")
	if err != nil {
		return nil, err
	}
	defer stmt.Close()
	err = query.SelectObjects(stmt, dest)
	if err != nil {
		return nil, err
	}
	return versions, nil
}
// Return a slice of binary integer tuples. Each tuple contains the schema
// version and number of api extensions of a node in the cluster.