📄 readme
字号:
Ok, so this is a quick and dirty 'HOWTO' for the DB adapter.See http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.service.rdbms.html================================================================Add the following line to your xmlBlaster.properties file: JdbcDriver.drivers=oracle.jdbc.driver.OracleDriver,org.gjt.mm.mysql.Driver,postgresql.Driver ProtocolPlugin[JDBC][1.0]=org.xmlBlaster.protocol.jdbc.JdbcDriver CbProtocolPlugin[JDBC][1.0]=org.xmlBlaster.protocol.jdbc.CallbackJdbcDriverJdbcDriver.drivers is a comma delimited list of databse drivers.Use as many as you like.The appropriate driver class files(jar) must be in your classpath.================================================================Start up the server (java org.xmlBlaster.Main)-----TESTING-----You will need access to a database!You can use the XmlDBClient unchanged if you don't mind typing a lot.To invoke the client, try something similar to the following:java javaclients.jdbc.XmlDBClient -url "jdbc:postgresql://24.3.47.214/postgres" -user postgres -pass secret -type query -query "select * from foo_table" -limit 50 -confirm trueor to invoke an update: java javaclients.jdbc.XmlDBClient \ -url "jdbc:oracle:thin:@localhost:1521:MARCEL" \ -user marcel \ -pass secret \ -type update \ -query "INSERT INTO myTable VALUES( '1', to_date('0816', 'hh24mi'), 'james', 'START')"Options: -url (any valid JDBC url) -user (valid DB username) -pass (valid DB password) -query (any valid SQL syntax) -type (query|update) query by default - determines the interaction with db -confirm (true|false) true by default - when set to true, you get an answer -limit (any integer) 50 by default - used to limit the number of rows returnedNOTE: If you are querying, set your -type to 'query'. If you are updating (insert, update, delete) set -type to 'update'. If you are updating and don't want a confirmation, set -confirm to 'false'.For an example of what to expect, please look over the .xml fileslocated in demo/javaclients/jdbc.Most exceptions are caught and returned in the appropriate xml message.There are still one or two bugs that need to be squashed,but I am working on those.If you have any difficulty or questions, feel free to send me an email atjmbirchfield@proteus-technologies.comJimNote: A request xml string looks low level typically like this: <database:adapter xmlns:database='http://www.xmlBlaster.org/jdbc'> <database:url>url</database:url> <database:username>user</database:username> <database:password>passwd</database:password> <database:interaction type='query'/> <database:command><![CDATA[select * from person></database:command> <database:connectionlifespan ttl='1'/> <database:rowlimit max='100'/> <database:confirmation confirm='true'/> </database:adapter>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -