Switch to: V9V8V7V6V5

Valentina Studio Examples : JS Scripts

Code Generators

In this Valentina Project (updated 2019-10-26 for v9.7) 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 the “Execute” button. Some scripts may want a current Database/Table to be selected in the Schema Editor.

Code Generator for Xojo

Example: Function with INSERT/UPDATE/DELETE with Binding

[RBDB API] - [mySQL][SQLite]

Generate code of a function with SQL INSERT/UPDATE/DELETE with Binding.

This example also demonstrates how easy you can create own dialog using JS.

Example: Project with CreateSchema

[mySQL][SQLite]

Generate XML Xojo Project with a module, which contains many functions CreateTable_TN(), CreateView_VN, CreateTrigger_TN(), … CreateSchema.

Script write correct Connect() Disconnect() methods for local SQLite or remote MySQL databases. The project is workable.

Example: Project VDB ClassWay

[ValentinaDB]

Generate XML Xojo Project with a module, which contains the set of classes to implement the Class-way style of Valentina DB.