Skip to content

How to update custom services after upgrade to v2.0.0 #16780

Answered by gvkries
kharaei asked this question in Q&A
Discussion options

You must be logged in to vote

If I'm not mistaken, instead of using SqlQuery you need to attach a SqlQueryMetadata to a Query itself:

var sqlQuery = new Query() 
{
    Source = SqlQuerySource.SourceName,
    Name = "category-list",
    Schema = "{ \"type\" : \"ContentItem/Categories\" }",
    ReturnDocuments = false
};
sqlQuery.Put(new SqlQueryMetadata()
{
    Template = $"select * from {Keys.ViewNames.Categories}"
});

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kharaei
Comment options

You must be logged in to vote
0 replies
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