Benutzer-Werkzeuge

Webseiten-Werkzeuge


python:jython_scripting_database

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
python:jython_scripting_database [2016/11/06 16:29] – [Quellen] gpipperrpython:jython_scripting_database [2016/11/15 19:59] (aktuell) gpipperr
Zeile 36: Zeile 36:
 Folgende Objekte können in Script (default Java Script Syntax ! ) direkt angesprochen werden: Folgende Objekte können in Script (default Java Script Syntax ! ) direkt angesprochen werden:
   * **sqlcl** - SQLCL selbst wie sqlcl.setStmt(„select * from dual“) und sqlcl.run() um das dann auszuführen   * **sqlcl** - SQLCL selbst wie sqlcl.setStmt(„select * from dual“) und sqlcl.run() um das dann auszuführen
 +    * Methods: **setStmt(<String>)** - Ein SQL Statment oder einen SQLcl Befehl in den Buffer schrieben
 +    * Methods: **run** - Den Buffer ausführen
   * **ctx** - Object vom Typ ScriptContext, kann direkt angesprochen werden - wie ctx.write(„String“)   * **ctx** - Object vom Typ ScriptContext, kann direkt angesprochen werden - wie ctx.write(„String“)
-  * **util** - wie var user=util.executeReturnOneCol('select user from dual'); +    Methods: **write(<String>)** - Auf Standard Out schreiben 
- +    Methods: **getProperty(<String>)** - Wert im Session Context setzen  
-<code> +    Methods: **setProperty(<String>,<Object>)** - Wert aus dem Session Context holen 
-    sqlcl +  * **util** - wie var user=util.executeReturnOneCol('select user from dual'
-        Methods:   +      Methods: **execute(<string>,binds)** executes whatever is passed in with a boolean return for success/failure 
-             setStmt(<String of stuff to run>) +      * Methods: **executeReturnOneCol(<string>,binds)** - executes and returns the first row , first column 
-                 This can be a single statement, an entire script of stuff, or any sqlcl command such as "@numbers.sql" +      * Methods: **executeReturnListofList(<string>,binds)** - executes and returns an array(rows) of arrays(row).   
-             run() +      * Methods: **executeReturnList(<string>,binds)**- execute and returns and array ( rows ) of objects ( row )
-                 Runs whatever is in the stmts +
- +
-   ctx ( this has tons of methods but this is the single most important ) +
-       Methods: +
-             write(<String>+
- +
-   util ( again tons of methods )  +
-       Methods: +
-              execute(<string>,binds) +
-                   executes whatever is passed in with a boolean return for success/failure +
-              executeReturnOneCol(<string>,binds) +
-                   executes and returns the first row , first column +
-              executeReturnListofList(<string>,binds) +
-                   executes and returns an array(rows) of arrays(row).   +
-              executeReturnList(<string>,binds) +
-                   execute and returns and array ( rows ) of objects ( row ) +
-               +
- </code> +
-See http://krisrice.blogspot.de/2015/10/sqlcl-oct-13th-edition.html              +
  
 +      
  
 Hier das erste Hello World Beispiel: Hier das erste Hello World Beispiel:
Zeile 266: Zeile 249:
 Scripting JS Scripting JS
   * http://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html   * http://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html
 +
python/jython_scripting_database.txt · Zuletzt geändert: 2016/11/15 19:59 von gpipperr