Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
jvx:server:storage:custom_sql [2018/02/02 09:36]
admin created
jvx:server:storage:custom_sql [2020/07/22 13:19] (current)
cduncan Edited for English grammar (capitalization, punctuation, correct verb conjugation)
Line 1: Line 1:
 ~~NOTRANS~~ ~~NOTRANS~~
-~~Title: Using custom ​SQL statements~~+~~Title: Using Custom ​SQL Statements~~
  
-JVx has very useful database support based on DBStorage and DBAccess. The DBStorage is very powerful and supports automatic foreign, primary and unique key detection. It reads allowed (check constraints) and default values automatically from your database table.+JVx has very useful database support based on DBStorage and DBAccess. The DBStorage is very powerful and supports automatic foreign, primaryand unique key detection. It reads allowed (check constraints) and default values automatically from your database table.
  
 But sometimes the recommended usage is not enough for your requirements. We recommend to use following: But sometimes the recommended usage is not enough for your requirements. We recommend to use following:
Line 15: Line 15:
 This code is enough to have full CRUD support and automatic linked cell editor detection. This code is enough to have full CRUD support and automatic linked cell editor detection.
  
-But it's also possible to read from a view and write-back into a table:+It's also possible to read from a view and write back into a table:
  
 <file java> <file java>
Line 25: Line 25:
 </​file>​ </​file>​
  
-If you want to add additional columns, it's better ​using a view. But if you use a view, the automatic link cell editor detection won't work because of missing metadata information.+If you want to add additional columns, it's better ​to use a view. But if you use a view, the automatic link cell editor detection won't work because of missing metadata information.
  
-But it's trivial to add missing metadata information:​+However, ​it's trivial to add missing metadata information:​
  
 <file java> <file java>
Line 36: Line 36:
 </​file>​ </​file>​
  
-The statement will add a link cell editor for the columns EXT_PLAYER_ID and EXT_PLAYER_NAME (from the view). The link cell editor will read data from EXTINFO (table, view, ...) and will use ID and NAME column as display and selection values (JVx hides ID columns per default).+The statement will add a link cell editor for the columns EXT_PLAYER_ID and EXT_PLAYER_NAME (from the view). The link cell editor will read data from EXTINFO (table, view, etc.) and use ID and NAME column as display and selection values (JVx hides ID columns per default).
  
-If you have a prepared storage for your link cell editor records, it's also possible to use following:+If you have a prepared storage for your link cell editor records, it's also possible to use the following:
  
 <file java> <file java>
Line 66: Line 66:
 </​file>​ </​file>​
  
-Above usage was still very trivial and DBStorage supports ​very custom statements like this:+The above usage was still very trivialand DBStorage supports custom statements like this:
  
 <file java> <file java>
Line 91: Line 91:
 </​file>​ </​file>​
  
-The last syntax is nice for copy/paste a statement from your DB tool. The DBStorage executes:+The last syntax is nice to copy/paste a statement from your DB tool. The DBStorage executes:
  
 <file sql> <file sql>
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information