Python Module for MySQL Workbench not working -


i writing plugin mysql workbench, when execute nothing happens. (no errors)

code:

from wb import * import grt import mforms  moduleinfo = definemodule(name= "workbench module", author= "openbyte", version="1.0")   @moduleinfo.plugin("openbyte.workbench_module", caption= "workbench module", input=[wbinputs.currentsqleditor()], pluginmenu="sql/utilities") @moduleinfo.export(grt.int, grt.classes.db_query_editor) def executescript(editor):          editor.replacecontents("test")          return 0 

if don't see errors means plugin wasn't executed, because should attributeerror. db_query_editor doesn't have function replacecontents. try this:

from wb import definemodule, wbinputs import grt  moduleinfo = definemodule(name= "testmodule", author= "oracle corp.", version="1.0")   @moduleinfo.plugin("wb.sqlide.test_module", caption= "test module", input= [wbinputs.currentqueryeditor()], pluginmenu= "sql/utilities") @moduleinfo.export(grt.int, grt.classes.db_query_queryeditor) def test_module(editor):     editor.replacecontents("test")     return 0 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -