Update query-generator.js

Added CREATE INDEX **IF NOT EXISTS**
Added createOrUpdate