Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] File System persisted queries #858

Merged

Conversation

willwolfram18
Copy link
Contributor

This is a first-pass/WIP for #266 and is by no means ready for merge. I just wanted to take a crack at this and see if what's been bubbling in my head is lining up with what we might be looking for.

Since the UTF-8 parser hasn't yet been implemented, nor has the IQuery interface, I just stubbed one out to convey intent. Ultimately I think the read/write interfaces are just responsible for that: read/write the query given some identifier.

If this looks/feels good then I'm happy to start trying to build out the other storage mediums as far as I can until we get UTF-8 parsing done (or at least started that I can work with).

@michaelstaib
Copy link
Member

Since the UTF-8 parser hasn't yet been implemented, nor has the IQuery interface, I just stubbed one out to convey intent. Ultimately I think the read/write interfaces are just responsible for that: read/write the query given some identifier.

That is good, I have already started work on this on the client branch. I will merge that soon.

@michaelstaib
Copy link
Member

If this looks/feels good then I'm happy to start trying to build out the other storage mediums as far as I can until we get UTF-8 parsing done (or at least started that I can work with).

I think I can merge something tomorrow for you-

/// <summary>
/// A tool for storing queries to some persistence medium.
/// </summary>
public interface IStoreQueries
Copy link
Member

@michaelstaib michaelstaib Jun 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename that to IWriteStoredQueries .... just to have some symmetry between the names?

/// <param name="queryIdentifier">The query identifier.</param>
/// <param name="query">The query to store.</param>
/// <returns>An asynchronous operation.</returns>
Task StoreQueryAsync(string queryIdentifier, IQuery query);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same goes for this regarding symmetry of names.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally went with IWriteStoredQueries and a method of WriteStoredQueryAsync() but something felt funny about using two words back-to-back that mean "persist". That said, I'm in no way opposed to going back to IWriteStoredQueries. I think there is still some symmetry between the interfaces in that one states "I store queries" and then the other is "I read stored queries" but it is a much looser symmetry than IRead and IWrite.

@michaelstaib
Copy link
Member

@willwolfram18 sorry, was completely out for the last two days. I hope I can merge the interfaces over the weekend.

@michaelstaib
Copy link
Member

OK, this one is done now for V10. We can add more providers with the next version. I will start on the documentation sometime tonight.

@michaelstaib michaelstaib merged commit 1bf148d into ChilliCream:master Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants