gen javascript for ddl . stage 1