I'm making an application that requires an online and local database. I have a lot working, but I have a list of things I need for "setup" for each database table.
I'm using SQLDelight and so I need a class (for each database table) like this
public abstract class Db{TableName} implements {TableName}Model {
public static final {TableName}Model.Factory<Db{TableName}> FACTORY = new {TableName}Model.Factory<>(AutoValue_Db{TableName}::new);
public static final RowMapper<Db{TableName} MAPPER = FACTORY.select_allMapper();
where {TableName} should be replaced by the name of each table.
To me it just looks like a for loop that would run through the filenames of every .sq file I have (these initialize my database tables and {Tablename}Model classes - the latter through SQLDelight), but I do not know how to implement this.