code: func genHprose(dbms, connStr string, mode byte, selectedTableNames map[string]bool, currpath string) {
  	db, err := sql.Open(dbms, connStr)
  	if err != nil {
  		beeLogger.Log.Fatalf("Could not connect to '%s' database using '%s': %s", dbms, connStr, err)
  	}
  	defer db.Close()
  	if trans, ok := dbDriver[dbms]; ok {
  		beeLogger.Log.Info("Analyzing database tables...")
  		tableNames := trans.GetTableNames(db)
  		tables := getTableObjects(tableNames, db, trans)
  		mvcPath := new(MvcPath)
  		mvcPath.ModelPath = path.Join(currpath, "models")
  		createPaths(mode, mvcPath)
  		pkgPath := getPackagePath(currpath)
  		writeHproseSourceFiles(pkgPath, tables, mode, mvcPath, selectedTableNames)
  	} else {
  		beeLogger.Log.Fatalf("Generating app code from '%s' database is not supported yet", dbms)
  	}
  }
docs: // Generate takes table, column and foreign key information from database connection
  // and generate corresponding golang source files