Reputation: 159
Using OrmLite, with TableUtils
I can create a table, that map my entity in this way
TableUtils.createTable(connectionSource,MyClass.class)
is possible to create a sql tableView?
or I must insert the sql code?
Upvotes: 1
Views: 665
Reputation: 165
I tried code below with SQLite (on memory) and it seems to work fine.
String stmt = "CREATE VIEW viewName AS Select * FROM someTable ;";
foo.getDao().executeRawNoArgs(stmt);
Upvotes: 1
Reputation: 596
You can select from a view, just like any table, but you can't create views.
Upvotes: 1