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

Document SQLite function mappings #2733

Merged
merged 1 commit into from
Oct 6, 2020
Merged

Document SQLite function mappings #2733

merged 1 commit into from
Oct 6, 2020

Conversation

bricelam
Copy link
Contributor

@bricelam bricelam commented Oct 5, 2020

Part of #504

@bricelam

This comment has been minimized.

@smitpatel
Copy link
Member

Generally should break on the type. That is generally followed in various database documentations.

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

Breaking up into sections sounds good - some specific separate pages are also a good idea for larger topics (e.g. spatial, full-text search), with links from this main "function translation" page.

I'd vote for thematic sections rather than by type. There are potentially a huge number of types, and it could be quite bewildering to users who know they want to do something with binary types, but have no idea which .NET type is the right one.

DateTime.Now | datetime('now', 'localtime')
DateTime.Today | datetime('now', 'localtime', 'start of day')
DateTime.UtcNow | datetime('now')
dateTime.AddDays(value) | datetime(@dateTime, @value \|\| ' days')
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
dateTime.AddDays(value) | datetime(@dateTime, @value \|\| ' days')
DateTime.AddDays(value) | datetime(@dateTime, @value \|\| ' days')

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 used lower-case (and the suffix value) to represent instance members. Syntax highlighting would also help reinforce that, but I’d have to add it manually since these can’t be code blocks.

@@ -0,0 +1,76 @@
---
title: Built-in Functions - SQLite Database Provider - EF Core
Copy link
Member

Choose a reason for hiding this comment

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

Maybe "Function translations" or even just "Translations"? Specifically for Sqlite not everything here is "built-in" (i.e. all the ef_ stuff).

I'd also link to the spatial page from here when that arrives (this way this page covers all translations), and that's not built-in either.

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 had that, but changed to match Smit’s docs. Happy to change back.
Definitely needs a link to spatial.

Copy link
Member

Choose a reason for hiding this comment

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

Built-in functions is right one. Most of them are truly C# functions in LINQ side. Plus, I am gonna add text at the start that definition is bit blurry. The built-in part in this page is that EF Core provides this function translations rather than use defining it. (Comes in the box)

@smitpatel
Copy link
Member

Breaking on type is not exactly individual types but rather groups - numeric/ datetime/ string etc. Anyway I can update when I "add" other providers.

@bricelam bricelam changed the title Document SQLite function translations Document SQLite function mappings Oct 6, 2020
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.

3 participants