@Query¶
Command method extension
Query methods used for queries (select/update/insert).
Select query:
@Query("select from Model where name=?") List<Model> select(String name)
Update query:
@Query("update Model set name = ? where name = ?") int update(String to, String from)
void
, int
, long
, Integer
and Long
.
Insert query:
@Query("insert into Model (name) values (?)") Model insert(String name)
OSQLSynchQuery
used for selects and OCommandSQL
for updates and inserts.
Documentation links: