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

Constructing catalogs #18

Open
jkarni opened this issue Nov 22, 2016 · 6 comments
Open

Constructing catalogs #18

jkarni opened this issue Nov 22, 2016 · 6 comments

Comments

@jkarni
Copy link

jkarni commented Nov 22, 2016

In version 0.4, one could construct a Catalog with emptyCatalog or defaultCatalog, and a list of catalog updates. In 0.6, emptyCatalog/defaultCatalog seem to be gone, so it's unclear how to construct a catalog.

@jkarni
Copy link
Author

jkarni commented Nov 22, 2016

For what it's worth, emptyCatalog is still defined, but not exported.

@JakeWheat
Copy link
Owner

I revised the dialect handling and there is no sensible way to start with an empty or 'default' catalog. Can you do the same thing starting with the ansi dialect catalog? If you can explain what you are doing in more detail I can help figure out how to do it or what deficiency in hssqlppp there is. The new dialect approach is a WIP.

@jkarni
Copy link
Author

jkarni commented Dec 4, 2016

I've been building a library (see this and this to get a sense for what it will look like) on top of hssqlppp (which, by the way, is a wonderful and herculean enterprise - thanks for it!) that infers haskell types for queries and parameters. It will only support postgres for now, so I wanted to make sure the catalog updates are valid for postgres. ANSI catalog would suffice, but as far as I can tell, that's not exported either (nor is there a way to transform a dialect to catalog).

@JakeWheat
Copy link
Owner

Can you use something like 'diDefaultCatalog postgresDialect' to get the catalog?

@jkarni
Copy link
Author

jkarni commented Dec 6, 2016

Ha, sorry, that should have been obvious. Thanks!

@jkarni jkarni closed this as completed Dec 6, 2016
@JakeWheat
Copy link
Owner

I want to leave this bug open because I want to try to improve the documentation to make sure there is a guide about this and some examples.

@JakeWheat JakeWheat reopened this Dec 7, 2016
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

No branches or pull requests

2 participants