Closed akloster closed 2 years ago
Hi @akloster, sorry I'm away from my comp this week.
The doc is ordered by release versions at the moment.
Thanks
Hi @akloster,
you are using the CreaePullQuery
method as it was intended.
I tried to reproduce your issue
var ksql = context
.CreatePullQuery<UserRepresentation>("latest_user_representations")
.ToQueryString();
But the to ToQueryString
method in my case generated a different ksql
:
SELECT * FROM latest_user_representations;
as I see in your error message:
Statement: SELECT * FROM UserRepresentations;
Now I'm wondering what makes the difference. Could you please also post how you created your context and the UserRepresentation
class, please?
Thank you!
Regards Tomas
Hi @akloster,
I added a warning to the v0.10.0
section in the Readme.md
file that GetAsync
was renamed in version 2.0.0.
I really apologize for the confusion.
I'm not able to reproduce your issue, could you give us more details, please?
Regards Tomas.
Closing due to inactivity. Issue cannot be reproduced based on the provided input.
I see something a little different, using v2.3.1.
I pass a string table name param into the CreatePullQuery
method and the query that gets generated doesnt seem to respect the value I pass in, instead, it just appends an s
.
Example: I provide MATERIALIZED_ORDER
It queries against MATERIALIZED_ORDERS
Its a rather annoying inconvenience, and kind of misleading to offer a table name parameter that doesn't actually represent the table name.
But at least I know how to work around it, seeing as I can just pass in my table name, without the trailing s, knowing the library will add it.
Hi @itzJustKranker,
you can turn off the pluralization - it is configurable with the KSqlDBContextOptions.ShouldPluralizeFromItemName
option:
using ksqlDB.RestApi.Client.KSql.Query.Context;
var contextOptions = new KSqlDBContextOptions(@"http:\\localhost:8088")
{
ShouldPluralizeFromItemName = false
};
var context = new KSqlDBContext(contextOptions);
Is it better? Setting it to false by default in newer versions would be a breaking change.
Regards Tomas
I'm not sure I'm even using the method as intended, because I don't understand the documentation, such as it is and what there is of it. It took me a while to figure out that
GetAsync
changed toFirstOrDefaultAsync
for example, which is somewhere in the Readme, but the theGetAsync
is still used in a lot of code samples. Anyway, I assumed I could get away with something like this:Where latest_user_representations is the name of the materialized view / table I created manually on the CLI.
However, I get an error saying:
Environment (please complete the following information):