I'm writing a generic database API, and would love some advice on how you think it should handle field types. Let me give a little background.
My project's goal is to offer a single, simplified, Clojure-friendly API for most of your data persistence needs, so that: - you can easily use it in idiomatic Clojure since its API is composable - you can focus on your domain logic since the API is simple - you can easily use an in-memory backend in tests - several backends can be written, for Mongo, Postgres, GAE, etc You can see the intended usage in the readme<https://github.com/evanescence/datamapper>. (Note: it's not even close to working yet.) Now, I've already designed most of the public API<http://evanescence.github.io/datamapper/datamapper.core.html>and the backend interface<http://evanescence.github.io/datamapper/datamapper.interface.html>. But now I need to change both to accomodate field types. Problem is, I don't fully understand how types come into play. This is my rough understanding: First, when the backend stores a value into the database, it needs to know what kind of internal DB datatype to convert it to first. Second, when the API gives you back some data retrieved from the backend, it needs to know what kind of Clojure data-type to convert it to first. Does this sound like how you would expect field-type declarations to work if you were using this lib? If not, what would you expect them to do? -Steven -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.