Skip to content

Watch customSelect raw SQL query #3042

Answered by simolus3
itsJoKr asked this question in Q&A
Discussion options

You must be logged in to vote

We're expecting tables instead of names here since these are exposed as getters in a typical drift usage (it would be less convenient to use names which requires users to always use someTable.tableName). Adding tables like you did is possible, you can also use a custom table implementation not added to the database (thus not needing any codegen steps):

class EmptyTable extends Table with TableInfo<EmptyTable, Never> {
  @override
  final String actualTableName;

  EmptyTable(this.actualTableName);

  @override
  List<GeneratedColumn<Object>> get $columns => throw UnimplementedError();

  @override
  DatabaseConnectionUser get attachedDatabase => throw UnimplementedError();

  @override
  T…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@itsJoKr
Comment options

Answer selected by itsJoKr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants