EmerisHQ / tracelistener

UNIX named pipes-based real-time state listener for Cosmos SDK blockchains
GNU Affero General Public License v3.0
33 stars 8 forks source link

feat: introduce sqlgen #100

Closed Pitasi closed 2 years ago

Pitasi commented 2 years ago

This PR introduces sqlgen, a small tool I made to generate all the SQL boilerplate we had. The generated queries should be exactly the same as the old ones.

I'm trying a new "deploy strategy", that is, I added a feature flag called useSQLGen and only explicitly enabling it the new tracelistener will start using the queries.

The rationale behind this tool is that I will be able to change all queries behaviour (i.e. perform soft deletes and don't overwrite rows when height is older) in a single shot.