Valentina Studio Examples : JS Scripts

Code Generators

In this Valentina Project (updated 2017-05-10 for v7.1) you can find few JS scripts that generate some code for a DB or Table you choose in the Schema Editor.

Usage

  • Open this project in Valentina Studio 7.1 or newer.
  • In the folder gen_code choose a folder with language for which you want to generate. For example, 'for xojo'
  • Open script you want to run, click RUN button. Some scripts may want a current Database/Table to be selected in the Schema Editor.

Code Generator for Xojo

FUNCTION Cmd with Binding

[mySQL][SQLite]

Generate FUNCTION with SQL Insert/Update/Delete with Binding. This example also demonstrates how easy you can create own dialog using JS.

PROJECT with CreateSchema

[mySQL][SQLite]

Generate PROJECT with MODULE which has many functions CreateTable_TN(), CreateView_VN, CreateTrigger_TN(), … CreateSchema. Script write correct Connect() Disconnect() methods for local SQLite or remote mySQL dbs. Project is workable.

Project VDB ClassWay

[ValentinaDB]

Generate PROJECT with MODULE, which contains the set of classes to implement Class-way style of Valentina DB.