In a few words, ORM it is a set of classes to greatly simplify the use of SQL relational DataBases.
An example is worth a thousand words:
- Code: Select all Expand view
- function Main()
local oUsers := Users():New( "www.fivetechsoft.com:3306",;
"fivetech_users",;
"fivetech_antonio",;
"****" )
oUsers:First:Edit()
oUsers:Browse()
return nil
See how simple ORM turns our code:
- Code: Select all Expand view
- oUsers:Find( 120 ):Edit()
This is really nice:
- Code: Select all Expand view
- oUsers:Where( "country", "Spain" ):Where( "city", "Barcelona" ):Browse()
and this:
- Code: Select all Expand view
- oUsers:Where( "country", "Sp%", "Br%", "Ind%" ):OrderBy( "city" ):Browse()
as simple as this:
- Code: Select all Expand view
- oUsers:Select( "username", "city" ):Browse()
We are currently working on this ORM implementation for FWH and you will be using it real soon
Stay tuned for more examples comming these days!!!