![]() This is constructor for a Client/Server database. Sub Constructor(inConnection As VConnection) Generated project can be opened in Xojo IDE for immediate use.Īgain, so far this is only a draft to see what we can do with this new feature of Valentina Studio. each table becomes a class, Database object manage each table class, etc. This script generates the whole Xojo XML Project for a given database using Class Style of V4RB, Ps.SQLExecute( int, "", "", "", "", "", int, "", blobstr, int, int, int ) <= REPLACE place-holders AND remove this comment Ps.BindType( 11, MySQLPreparedStatement.MYSQL_TYPE_LONG ) // id Ps.BindType( 10, MySQLPreparedStatement.MYSQL_TYPE_LONG ) // user_id Ps.BindType( 9, MySQLPreparedStatement.MYSQL_TYPE_LONG ) // date_added Ps.BindType( 8, MySQLPreparedStatement.MYSQL_TYPE_BLOB ) // content Ps.BindType( 7, MySQLPreparedStatement.MYSQL_TYPE_STRING ) // file_type Ps.BindType( 6, MySQLPreparedStatement.MYSQL_TYPE_LONG ) // filesize Ps.BindType( 5, MySQLPreparedStatement.MYSQL_TYPE_STRING ) // folder Ps.BindType( 4, MySQLPreparedStatement.MYSQL_TYPE_STRING ) // filename Ps.BindType( 3, MySQLPreparedStatement.MYSQL_TYPE_STRING ) // diskfile Ps.BindType( 2, MySQLPreparedStatement.MYSQL_TYPE_STRING ) // description ![]() Ps.BindType( 1, MySQLPreparedStatement.MYSQL_TYPE_STRING ) // title Ps.BindType( 0, MySQLPreparedStatement.MYSQL_TYPE_LONG ) // bug_id Using parameter you can specify if you want to use set of Bind() calls to bind values, or put them into SqlExecute() or SqlSelect() command.įor UPDATE command, script is able recognize PrimaryKey fields of a table, and put them into WHERE part instead of UPDATE SET part.īellow are examples of generated code for both these variants:ĭim cmd as string = "UPDATE mantis_bug_file_table SET bug_id = ?, title = ?, description = ?, diskfile = ?, filename = ?, folder = ?, filesize = ?, file_type = ?, content = ?, date_added = ?, user_id = ? ) WHERE id = ?"ĭim ps as PreparedSQLStatement = db.Prepare( cmd ) The first script (draft of course) can take mySQL / postgreSQL / SQLite / VDB database.Īnd for the specified table GENERATE CODE for Xojo, with command INSERT / UPDATE / SELECT We will be happy to hear any ideas about TASKS in your daily job, that can be GENERATED instead. With sure in nearest time we will make this as special Tool in Valentina Studio, because to get real comfort developer must be able specify set of parameters and VStudio should remember them. Note that these JS scripts will be open source, we can develop a library of them. ![]() It is obvious that we must be able to do this for all supported languages and IDEs: Xojo, C++, Java, NET, PHP, etc. ![]() We going to spend many time to develop this feature - CODE GENERATION in Valentina Studio. For now we put this scripts into Valentina Project.ĭuring last days we have develop a couple of such JS scripts. ![]() Thanks to this, we can now write JS scripts directly in Valentina Studio, which can do a lots of different job. This means huge job to push into JavaScript classes/methods/properties that are related to internal C++ objects of Valentina Studio model. We adding integration of the QT JS engine. In 7.1 we took one more step forward to JavaScript. In 7.0 we integrated a JavaScript engine into Valentina Reports - this feature is now available for ALL Valentina products. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |