func (sys *SystemConfig) Cameras() []*Camera {
	cxn := sys.getDB()
	defer cxn.Close()

	if rows, err := cxn.Query("select Name, ID, AspectRatio, Address, Diurnal, Dewarp, Latitude, Longitude, Timelapse, ImageURL, RTSPURL, Private from Cameras"); err != nil {
		panic(err)
	} else {
		defer rows.Close()

		ret := []*Camera{}
		for rows.Next() {
			c := &Camera{}
			rows.Scan(&c.Name, &c.ID, &c.AspectRatio, &c.Address, &c.Diurnal, &c.Dewarp, &c.Latitude, &c.Longitude, &c.Timelapse, &c.StillURL, &c.RTSPURL, &c.Private)
			if c.Name == "" || c.ID == "" {
				panic(fmt.Errorf("camera entry stored with null fields '%s'/'%s'", c.ID, c.Name))
			}
			ret = append(ret, c)
		}

		sort.Slice(ret, func(i, j int) bool { return ret[i].Name < ret[j].Name })
		return ret
	}
}
// Cameras returns a list of all Camera rows currently configured. If there are no cameras, returns
// a nil slice.
Cameras returns a list of all Camera rows currently configured. If there are no cameras, returns
a nil slice.
// Cameras returns a list of all Camera rows currently configured . If there are no cameras returns // a nil slice .
func (sys *SystemConfig) Cameras() []*Camera {
	cxn := sys.getDB()
	defer cxn.Close()
	if rows, err := cxn.Query("select Name, ID, AspectRatio, Address, Diurnal, Dewarp, Latitude, Longitude, Timelapse, ImageURL, RTSPURL, Private from Cameras"); err != nil {
		panic(err)
	} else {
		defer rows.Close()
		ret := []*Camera{}
		for rows.Next() {
			c := &Camera{}
			rows.Scan(&c.Name, &c.ID, &c.AspectRatio, &c.Address, &c.Diurnal, &c.Dewarp, &c.Latitude, &c.Longitude, &c.Timelapse, &c.StillURL, &c.RTSPURL, &c.Private)
			if c.Name == "" || c.ID == "" {
				panic(fmt.Errorf("camera entry stored with null fields '%s'/'%s'", c.ID, c.Name))
			}
			ret = append(ret, c)
		}
		sort.Slice(ret, func(i, j int) bool { return ret[i].Name < ret[j].Name })
		return ret
	}
}
func ( sys * SystemConfig ) Cameras ( ) [ ] * Camera { cxn := sys . getDB ( ) defer cxn . Close ( ) if rows , err := cxn . Query ( " " ) ; err != nil { panic ( err ) } else { defer rows . Close ( ) ret := [ ] * Camera { } for rows . Next ( ) { c := & Camera { } rows . Scan ( & c . Name , & c . ID , & c . AspectRatio , & c . Address , & c . Diurnal , & c . Dewarp , & c . Latitude , & c . Longitude , & c . Timelapse , & c . StillURL , & c . RTSPURL , & c . Private ) if c . Name == " " || c . ID == " " { panic ( fmt . Errorf ( " " , c . ID , c . Name ) ) } ret = append ( ret , c ) } sort . Slice ( ret , func ( i , j int ) bool { return ret [ i ] . Name < ret [ j ] . Name } ) return ret } }
Cameras returns a list of all Camera rows currently configured.
Cameras returns a list of all Camera rows currently configured .