Home
Terrazine is not just parser of data structures in to SQL. It provides tools for sending query to db, parsing result and presenting it.
SQL described by data structures. You can build data structures with the help of Constructor, that provides methods like select
, join
, with
and so on. In future I would add helper methods for structures building.
You can initialize constructor by Terrazine.new_constructor(structure = {})
Now it under development and have only several methods, some of them just rewrite structure without merging it.
Just helpers for describing data structure... they are still at the stage of deliberation-_- Someone advise me to add more functions - they are easier than data structures?
You can send request by Terrazine.send_request(structure, params = {})
. For now params used for parsing/representing result options and for specifying db connection.
- :connection - db connection instance
- :types - describing db result parsing structure. For example if you from db got
result.field => '{val_1, val_2}'
you should addtypes: {field: :array}
to params - :presenter_options