Comments (6)
I guess your tests are using cockroachdb, is why they passed? Cockroach is only compatible at the protocol level, it is not source or feature compatible with postgres. For some reason in the case of extract function they chose not to even be compatible with ANSI SQL.
from honeydew.
just pushed proper postgres support in 8134472 on master, try it out and let me know how it goes. :)
from honeydew.
@koudelka It works, thanks! Glad to have this in the main repository already.
I have a couple of suggestions based on the path I was headed down.
The SQL in your Postgres
module looks like pure ANSI, no special Postgres features. I'd call the module "ANSI". I'd also suggest changing the option you pass to honeydew_fields
as dialect
rather than database
. Dialects now would be :cockroach
and :ansi
, in the future maybe someone will add :cql
for Cassandra etc.
Second, you could have a single example project support multiple database adapters and run the test suite on both of them by using a separate MIX_ENV. I had started to make a separate MIX_ENV=pg_test, which changed the adapter - you could also use it in the migration to select the database/dialect depending on the value of Mix.env
. I didn't get that far since you mentioned you were working on this, but the first step of the mix.config I did here: smartmetals@e0edef0
If you take both these suggestions adding support for Maria is completely trivial I think, it would just be another MIX_ENV for test and I don't think would require any different SQL code but I didn't try it yet.
from honeydew.
Can you see a reason to want to select which dialect is used, outside of needing to manually select it when the adapter is ambiguous?
Thanks for the MIX_ENV
idea! I really didn't like the idea of duplicating the example project. :)
from honeydew.
@koudelka No, I think if the macros can get access to the applications' Repo configuration you could save the user the trouble, but I think also if a single ANSI dialect will cover Postgres and MySQL (as written it would work with SQL Server and Oracle too, I think) you can just default to that, which will cover 95% of users.
from honeydew.
combined the example into a single project, thanks again for the suggestion. :)
from honeydew.
Related Issues (20)
- Clear an entire queue HOT 1
- Disabling clock freeze warning in test environment HOT 1
- Control retry time within job HOT 2
- Support Ecto.Adapters.MyXQL for MySQL HOT 6
- Mnesia as default queue not mentioned in start_queue/2 documentation HOT 1
- Custom queue makes Honeydew crashs by timeout HOT 4
- warning: function equal?/2 required by behaviour Ecto.Type
- How to rerun jobs if the system crashes? HOT 1
- pg2 scheduled for removal HOT 10
- How to cancel Jobs in Ecto Queue? HOT 1
- Doc links to code broken HOT 2
- Creates a behaviour for `Honeydew.Logger` module
- Unexpected behavior: bad_return application start failure using Mnesia outside of Honeydew HOT 5
- no match of right hand side value: [] HOT 2
- API for accessing in_progress jobs
- Redesigning API for concurrency
- Timeout error on application start HOT 1
- ErlangQueue doesn't respect delay_secs option HOT 1
- Shutdown hangs HOT 11
- Error when listing mnesia in mix extra_applications.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honeydew.