1. Lynn Fredricks
  2. Announcements & News
  3. Thursday, March 12 2020, 03:21 PM
  4.  Subscribe via email
New productivity features for the Valentina Studio Schema Editor and new QProcess in Valentina Forms lets you run external applications, execute Bash scripts, AppleScript commands and more.

Valentina Studio / Valentina Studio Pro
Valentina Studio is the free, all purpose database management and forms client tool. Valentina Studio Pro combines database management with diagramming, forms creation, reporting and database continuous integration. Available on Windows, Linux and macOS.

  • [New][Pro][Schema Editor] – Duplicate command in the contextual menu of a Table. In the dialog you can specify also [x] – RAM, [x] – Temporary flags for the duplicate. You can also specify that N records should be copied. Works for all databases: MS SQL, MySQL, PostgreSQL, SQLite, Valentina DB.
  • [New][Pro][Form Editor] – The QProcess class, to run external applications, can be used to execute Bash scripts, AppleScript commands, etc.
  • [New][Schema Editor] – improved “Generate SQL : Create” tab, adding flags [x] – RAM, [x] – Temporary for Table objects into a dialog Read more …
  • [New][Schema Editor] – cmd+F keyboard shortcut moves focus to the SEARCH-field on the top right.
  • [New][Schema Editor] – Filter based on the first column of a database
  • [Imp][Data Editor] – Open SQL Editor, Query Editor, Server Admin for active database/connection from the toolbar.
  • [Fix][SSH] – Fixed sending long packets via SSH. This makes the execution of long queries more stable.
  • [Imp][Load Dump] – Update dump loading progress more frequently.
  • [Imp][Load Dump] – Show the list of errors on the last page of the Load Dump wizard.

Notes on this update to Valentina Studio
MySQL does not expose a temporary table in SHOW TABLEs. To use it in the SQL Editor you should remember its name.
Valentina Server
Valentina Server incorporates Valentina Reports Server, Valentina Forms Server and two database servers: Valentina DB Server and Valentina SQLite Server. Available for Windows, Linux, macOS and Raspberry PI.

  • [Fix]8737 – VServer.Shutdown close all databases properly.
  • [Fix]8746 – SystemBackupCatalog property changes do not impact to “BACKUP DATABASE” statement.
  • [Imp]8741 – Use standard macOS authorization dialog in the Valentina Server preference pane. Support for Touch ID authentication to Start/Stop the server.

Valentina Database
Valentina DB is Paradigma Software advanced, object relational database and available in Valentina DB Server (a part of Valentina Server) and Valentina DB ADKs (developer components for adding runtime database support to applications).

  • [Fix]8744 – Error when doing SQL with 2 UNIONs

Valentina ADK for Xojo
Valentina Database ADK and Valentina Reports ADK are available on Windows, Linux and macOS (with Raspberry PI) for Xojo development. The Valentina ADK Client for Xojo also works with Valentina Server.

  • [Fix]8739 – VPreparedStatement gives the wrong result if one parameter has an empty string

Notes on this update to Valentina ADK for Xojo
Xojo’s empty string looks like a nullptr (inside V4RB plugin), but it must be not an SQL-NULL for bind value. If you need to bind a NULL you should call the BindNull() method or use BuildArrayOfBinds() instead of BuildArrayOfBindsFromStrings(). In other words – you can not encode SQL-null using RealString.

This update is now available from the Paradigma Software downloads site. See also the announcement on the official Paradigma Software blog announcement for Valentina 10.1..
References
  1. https://valentina-db.com/docs/dokuwiki/v10/doku.php?id=valentina:products:vstudio:help:dialogs:duplicate_table
  2. https://valentina-db.com/docs/dokuwiki/v10/doku.php?id=valentina:products:vstudio:help:dialogs:generate_sql
  3. https://valentina-db.com/all-downloads/current
Comment
There are no comments made yet.
Lynn Fredricks Accepted Answer
You can now execute shell scripts in code within Valentina Forms, including bat and bash scripts. Bash is the GNU Project's Bourne Again SHell, a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion, and a slew of other features.

Use QProcess.execute to create a new directory via bash:
QProcess.execute( 'sh', [ '-c', 'mkdir /tmp/qprocess_dir' ] );


But with this approach, you don't receive information about errors. In order to get an error, it is necessary to use QProcess.start to launch an application and read errors with QProcess.readAllStandardError method:

var p = new QProcess;
p.start( 'sh', [ '-c', 'mkdir /tmp/qprocess_dir' ]);
p.waitForFinished( -1 );

var result = String( p.readAllStandardError() );

if( result.length > 0 )
QMessageBox.critical( 'Error', result );

On the second run, it will show a message box with text ”mkdir: /tmp/qprocess_dir: File exists” To read the output of the script QProcess.readAllStandardOutput method is used:

var p = new QProcess;
p.start( 'sh', [ '-c', 'ps ax | wc -l' ]);
p.waitForFinished( -1 );

var result = String( p.readAllStandardOutput() );
QMessageBox.information( 'Title', 'There are ' + result.trim() + ' processes running' );

As a result, a message box with a similar text will be shown:

http://www.valentina-db.com/images/valentinastudio/10/vs_forms_bash.png

New in Valentina Studio 10.1
Valentina Studio incorporates QProcess class into its JavaScript object model, giving a way to extend the functionality of your forms and scripts with the power of other applications. QProcess class allows you to execute an external application, specify parameters, write to its standard input, read results from its standard output and more.
References
  1. https://valentina-db.com/docs/dokuwiki/v10/doku.php?id=valentina:products:vstudio:help:form_editor:launch_app#bash
Comment
There are no comments made yet.
Lynn Fredricks Accepted Answer
The Forms team is also enthusiastic about our support for Python. The following example written in Python demonstrates how to open an existing Microsoft Excel file from a Form script, fetch data from its first column and pass it to the text edit form control:

var pythonScript = `from openpyxl import load_workbook

wb = load_workbook('/tmp/records.xlsx')

for i in range( 2, wb.active.max_row ):
print( wb.active[ 'A{0}'.format(i) ].value )`;

var p = new QProcess;
p.start( '/usr/local/bin/python3', [ '-c', pythonScript ] );
p.waitForFinished( -1 );

this.textEdit.plainText = String( p.readAllStandardOutput() );


And the result...

http://www.valentina-db.com/images/valentinaforms/vsforms_import_from_excel_with_python400x330.png

New in Valentina Studio 10.1
Valentina Studio incorporates QProcess class into its object model, giving a way to extend the functionality of your forms and scripts with the power of other applications. QProcess class allows you to execute an external application, specify parameters, write to its standard input, read results from its standard output and more.

Don't forget that both Valentina DB ADK and Valentina Reports ADK are available for Python, and Python is another language supported by Valentina CLIENT for Valentina Server.
References
  1. https://valentina-db.com/docs/dokuwiki/v10/doku.php?id=valentina:products:vstudio:help:form_editor:launch_app#python
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.