query parts progress

This commit is contained in:
2024-02-22 07:29:17 +01:00
parent b255ae22b4
commit 16d7fd7e76
10 changed files with 43 additions and 21 deletions
+3 -3
View File
@@ -49,8 +49,8 @@ struct book
}
};
QUERY_HELPER(author, id, first_name, last_name, date_of_birth, year_of_birth, distinguished)
QUERY_HELPER(book, id, book_author, title, published_in)
QUERY_HELPER(authors, id, first_name, last_name, date_of_birth, year_of_birth, distinguished)
QUERY_HELPER(books, id, book_author, title, published_in)
int main()
{
@@ -67,7 +67,7 @@ int main()
connection c(dns, s);
auto books = c.query()
.select<book>({qh::book.id.name})
.select<book>({matador::qh::books.id.name})
.from({"book"})
.join_left({"authors"})
.on("book.author_id"_col == "author.id"_col)