add js query & refactor generation in golang