Android SQLite multiple databases and CRUD -


i'm trying implement databases linked foreign keys , i've been told it's better (more secure) stick queries instead of rawqueries in general, i'm unsure how far. what's best approach crud operations; use multiple queries (.query(.)) or use more sophisticated rawqueries?

for example

if want delete row table iff there no other table linking particular row.

or there perhaps better ways when constructing database makes such operations smoother?

also, when inserting table , there's row (and column unique or similar restraint), there quick way find rowid of value being inserted regardless of whether or not inserted or exists?

i tried `insertwithonconflict(.)` 

but throws -1 instead of rowid when exists. there better way execute query afterwards upon failure?


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -