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

Support returning different map types besides Instance #133

Open
camsaul opened this issue Mar 24, 2023 · 2 comments
Open

Support returning different map types besides Instance #133

camsaul opened this issue Mar 24, 2023 · 2 comments
Labels
low priority new feature under consideration Possible ideas that may be implemented in the future

Comments

@camsaul
Copy link
Owner

camsaul commented Mar 24, 2023

This was in Toucan 2 at one point, but I ultimately removed it in one of the many simplification passes

"Magic map" support is one use case, or even returning Toucan 1 record types if you're a kook. Maybe you just want plain maps? Who knows.

@camsaul camsaul added under consideration Possible ideas that may be implemented in the future new feature low priority labels Mar 24, 2023
@escherize
Copy link

Put me down for plain maps.

I use into {} pretty often, e.g.:

(keys (t2/hydrate (t2/select Database :id 1337) :tables))

Which fails with

Error printing return value (ClassCastException) at clojure.lang.APersistentMap$KeySeq/first (APersistentMap.java:168).
class toucan2.instance.Instance cannot be cast to class java.util.Map$Entry (toucan2.instance.Instance is in unnamed module of loader clojure.lang.DynamicClassLoader @7731595c; java.util.Map$Entry is in module java.base of loader 'bootstrap')

@markbastian
Copy link

I'm also a big fan of "just gimme a map." Maybe supporting datafy would do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority new feature under consideration Possible ideas that may be implemented in the future
Projects
None yet
Development

No branches or pull requests

3 participants