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

It'd be nice to be able to set metadata on functions defined by hugsql #17

Closed
ryfow opened this issue Jan 26, 2016 · 3 comments
Closed
Milestone

Comments

@ryfow
Copy link
Contributor

ryfow commented Jan 26, 2016

I'm most interested in marking functions private, but other metadata might be helpful too.

@csummers csummers added this to the 0.4.0 milestone Feb 3, 2016
@csummers
Copy link
Member

csummers commented Feb 3, 2016

I think this is a good idea. I might have a short-hand to specify private with a dash suffix on :name (similar to defn- convention):
-- :name- employees :?

I'll have to think about what makes sense for additional metadata. Thanks for the idea!

@csummers
Copy link
Member

csummers commented Feb 9, 2016

This will ship in 0.4.0 with the following syntax:

-- :name- a-private-fn :?
-- notice the dash suffix on :name- above
select * from test

-- :name another-private-fn
-- :meta {:private true}
select * from test

-- :name user-meta
/* :meta {:one 1
          :two 2
          :three 3} */
select * from test

@ryfow
Copy link
Contributor Author

ryfow commented Feb 11, 2016

awesome! thanks

@ryfow ryfow closed this as completed Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants