finish code gen based on mysql