Hi, > I am considering a major change to my application and before I do, I was > wondering if anyone knew the answer to the following. > > I have a model that has an attribute, value, which looks like this > [[1234959596, 10.23],[1234959596, 10.23],[1234959596, 10.23]] > > basically an array of [bigint, float] > > Can I do this with ChicagoBoss and postgress?
The first thing that I would say offhand is that to model that in a relational way, your model, say, foo, should have a related model 'bar' that has foo_id, bigints and floats. foo should have many bars, and bars should belong to foo. That would be the 'clean' way of doing things. Then you could do FooInstance:bars() or create your own function to return just the array you are interested in. You might be able to utilize Postgres' arrays too, but the only way to check is to try it and see - perhaps working up from the Postgres layer. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ -- You received this message because you are subscribed to the Google Groups "ChicagoBoss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/chicagoboss. To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CA%2Bb9R_t%2Bh%2BS3DStV%2BOb0eDaeLw7ioNJcEga-ZPtNptRstb10OA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
