-
Notifications
You must be signed in to change notification settings - Fork 56
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
how to turn the generic implementation into specific mysql , mongo or postgress setup #13
Comments
@egarim : I am not a contributor to this repo. But I have a similar use case to yours. You should take a look at odata-v4-pg and odata-v4-sql packages. It is used to parse odata syntax and generate the sql queries.. You can very well use that as a template to derive your custom logic. FYI - All the magic happens in visitor.ts |
Hi @egarim, |
thanks I was just retaking this projects this is a great input
…On Tue, Aug 22, 2017 at 11:12 AM, Viktor Lázár ***@***.***> wrote:
Hi @egarim <https://github.com/egarim>,
odata-v4-server is a platform independent generic OData server and you can
implement any business logic in the controllers. Connectors are specific
OData query compilers, which are transforming the OData query AST to the
specific platform query. As @silasjohn <https://github.com/silasjohn>
correctly aligned you in the right direction, each connector magic is in
the connector's visitor.ts file. It is walking the AST tree's nodes and
builds the final SQL or mongodb query during the process. You can use an
existing connector (as you can see in the pg, mysql, and mssql connectors
extending the original odata-v4-sql visitor) or create a new one from
scratch. So finally, do the platform specific or custom logic in your
ODataController implementation. Connectors are just helpers to use the
OData query AST easier.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACu2pJK7DhgYoYqwgBCvL7hQiFKD2rUWks5sao1ZgaJpZM4NmOM7>
.
--
Regards
Jose Manuel Ojeda
Our sites
Xamarin Android Apps <http://www.xamarin-android-apps.com>
Xamarin iOS Apps <http://www.xamarin-ios-apps.com>
Xamarin Forms Apps <http://www.xamarin-forms-apps.com>
Skype:Jose.Manuel.Ojeda
GoogleTalk:joche.ojeda@bitframeworks.com
Cellphone: 503 79235612
QQ:2492739188
|
Hi i have been able to setup the odata server for postgres using the following repository
https://github.com/jaystack/odata-v4-server-pgsql-example
the repository contains the source with all needed references to connect to postgres serve a model, now I wonder, how can you start from the scratch with just the odata-v4-server and add the correct connectors to connect to an specific database.
can you provide an example to achieve my goal? to turn the generic version of the server and the turn it into a postgres , mongo or mysql odata server
The text was updated successfully, but these errors were encountered: