@@ -0,0 +1,1757 @@
+package org.labkey.dbutils.jooq;%0A%0Aimport org.jetbrains.annotations.Nullable;%0Aimport org.jooq.DataType;%0Aimport org.jooq.Field;%0Aimport org.jooq.Record;%0Aimport org.jooq.Table;%0Aimport org.labkey.api.data.AbstractTableInfo;%0Aimport org.labkey.api.data.DbSchema;%0Aimport org.labkey.api.data.JdbcType;%0Aimport org.labkey.api.data.SQLFragment;%0Aimport org.labkey.api.query.ExprColumn;%0Aimport org.labkey.api.query.UserSchema;%0A%0A/**%0A * Created by jon on 3/28/17.%0A */%0Apublic abstract class jOOQTableInfo%3CRecordType extends Record%3E extends AbstractTableInfo %7B%0A    protected UserSchema userSchema;%0A%0A    public jOOQTableInfo(String tableName, String dbSchema, UserSchema userSchema) %7B%0A        super(DbSchema.get(dbSchema), tableName);%0A        this.userSchema = userSchema;%0A%0A        registerColumns();%0A    %7D%0A%0A    protected void registerColumns() %7B%0A        for (Field field : getjOOQTable().fields()) %7B%0A            this.registerColumn(field);%0A        %7D%0A    %7D%0A%0A    protected void registerColumn(Field field) %7B%0A        DataType fieldType = field.getDataType();%0A        JdbcType jdbcType = JdbcType.valueOf(fieldType.getSQLType());%0A        String name = field.getName();%0A%0A        this.addColumn(new ExprColumn(this, name, new SQLFragment(ExprColumn.STR_TABLE_ALIAS + %22.%22 + name), jdbcType));%0A    %7D%0A%0A    @Override%0A    protected SQLFragment getFromSQL() %7B%0A        SQLFragment sql = new SQLFragment();%0A%0A        try (jOOQConnection jOOQConnection = new jOOQConnection(userSchema.getSchemaName())) %7B%0A            sql.append(jOOQConnection.create().selectFrom(getjOOQTable()).getSQL());%0A        %7D%0A%0A        return sql;%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public UserSchema getUserSchema() %7B%0A        return this.userSchema;%0A    %7D%0A%0A    public abstract Table%3CRecordType%3E getjOOQTable();%0A%7D%0A

Add TableInfo wrapper for jOOQ Tables.