func (c *Camera) Store() {
	cxn := System.getDB()
	defer cxn.Close()

	q := `insert into Cameras 
						(ID, Name, AspectRatio, Address, Diurnal, Dewarp, Latitude, Longitude, Timelapse, ImageURL, RTSPURL, Private) 
						values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
						on conflict(ID) do update set
							Name=excluded.Name, AspectRatio=excluded.AspectRatio, Address=excluded.Address, Diurnal=excluded.Diurnal, Dewarp=excluded.Dewarp, 
							Latitude=excluded.Latitude, Longitude=excluded.Longitude, Timelapse=excluded.Timelapse, ImageURL=excluded.ImageURL, RTSPURL=excluded.RTSPURL, Private=excluded.Private`
	diurnal := 0
	if c.Diurnal {
		diurnal = 1
	}
	dewarp := 0
	if c.Dewarp {
		dewarp = 1
	}
	private := 0
	if c.Private {
		private = 1
	}
	if _, err := cxn.Exec(q, c.ID, c.Name, c.Address, diurnal, dewarp, c.Timelapse, c.StillURL, c.RTSPURL, private); err != nil {
		panic(err)
	}
}
// Store records a new Camera to the database, or updates it if it already exists.
Store records a new Camera to the database, or updates it if it already exists.
// Store records a new Camera to the database or updates it if it already exists .
func (c *Camera) Store() {
	cxn := System.getDB()
	defer cxn.Close()
	q := `insert into Cameras 
						(ID, Name, AspectRatio, Address, Diurnal, Dewarp, Latitude, Longitude, Timelapse, ImageURL, RTSPURL, Private) 
						values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
						on conflict(ID) do update set
							Name=excluded.Name, AspectRatio=excluded.AspectRatio, Address=excluded.Address, Diurnal=excluded.Diurnal, Dewarp=excluded.Dewarp, 
							Latitude=excluded.Latitude, Longitude=excluded.Longitude, Timelapse=excluded.Timelapse, ImageURL=excluded.ImageURL, RTSPURL=excluded.RTSPURL, Private=excluded.Private`
	diurnal := 0
	if c.Diurnal {
		diurnal = 1
	}
	dewarp := 0
	if c.Dewarp {
		dewarp = 1
	}
	private := 0
	if c.Private {
		private = 1
	}
	if _, err := cxn.Exec(q, c.ID, c.Name, c.Address, diurnal, dewarp, c.Timelapse, c.StillURL, c.RTSPURL, private); err != nil {
		panic(err)
	}
}
func ( c * Camera ) Store ( ) { cxn := System . getDB ( ) defer cxn . Close ( ) q := `insert into Cameras 
						(ID, Name, AspectRatio, Address, Diurnal, Dewarp, Latitude, Longitude, Timelapse, ImageURL, RTSPURL, Private) 
						values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
						on conflict(ID) do update set
							Name=excluded.Name, AspectRatio=excluded.AspectRatio, Address=excluded.Address, Diurnal=excluded.Diurnal, Dewarp=excluded.Dewarp, 
							Latitude=excluded.Latitude, Longitude=excluded.Longitude, Timelapse=excluded.Timelapse, ImageURL=excluded.ImageURL, RTSPURL=excluded.RTSPURL, Private=excluded.Private` diurnal := 0 if c . Diurnal { diurnal = 1 } dewarp := 0 if c . Dewarp { dewarp = 1 } private := 0 if c . Private { private = 1 } if _ , err := cxn . Exec ( q , c . ID , c . Name , c . Address , diurnal , dewarp , c . Timelapse , c . StillURL , c . RTSPURL , private ) ; err != nil { panic ( err ) } }
Store records a new Camera to the database, or updates it if it already exists.
Store records a new Camera to the database or updates it if it already exists .