lxd/db/networks.go
func (c *Cluster) networks(where string, args ...interface{}) ([]string, error) {
	q := "SELECT name FROM networks"
	inargs := []interface{}{}

	if where != "" {
		q += fmt.Sprintf(" WHERE %s", where)
		for _, arg := range args {
			inargs = append(inargs, arg)
		}
	}

	var name string
	outfmt := []interface{}{name}
	result, err := queryScan(c.db, q, inargs, outfmt)
	if err != nil {
		return []string{}, err
	}

	response := []string{}
	for _, r := range result {
		response = append(response, r[0].(string))
	}

	return response, nil
}
func (c *Cluster) networks(where string, args ...interface{}) ([]string, error) {
	q := "SELECT name FROM networks"
	inargs := []interface{}{}

	if where != "" {
		q += fmt.Sprintf(" WHERE %s", where)
		for _, arg := range args {
			inargs = append(inargs, arg)
		}
	}

	var name string
	outfmt := []interface{}{name}
	result, err := queryScan(c.db, q, inargs, outfmt)
	if err != nil {
		return []string{}, err
	}

	response := []string{}
	for _, r := range result {
		response = append(response, r[0].(string))
	}

	return response, nil
}
// Get all networks matching the given WHERE filter (if given).