Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Ask Reuben 166 - Reflection  (Read 4129 times)
Reuben B.
Four Js
Posts: 1116


« on: March 31, 2023, 12:02:04 am »

Imagine a library function that takes two arguments, an SQL statement and an array variable of any flat record structure.  This function executes the SQL statement and populates the array variable with the result-set of the SQL statement. 

Code
  1. CALL sql2array(sql-statement, array-variable)

The Reflection API was introduced in Genero 4.00 and allows you to write such generic functions thus cutting down on the number of lines of code you have to maintain.  It does this by allowing you at runtime to inspect program elements such as variables and in some cases modify their values.
 
Read more athttps://4js.com/ask-reuben/ig-166/

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines