| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Storing data and code in a Db with LISP-like interface
> ... Not only should the function work for data entered
> prior to writing the function but also for new data
> entered after the function is written.
Below script provides a further example of the above. Suppose we want the name whose symbol string is currently 'employe' to also have the symbol string 'employee' (note the additional 'e' at end). Will the original db, schema and user-defined function still work? See below:
// Allow existing name whose symbol string is 'employe' // to have a second symbol string 'employee'. (create (and (select name instance *)
(select * symbol 'employe')
)
symbol
'employee'
// Verify getRoot function works with employe and employee.
// Both of the following display eve !!!
(msgbox (getRoot employe adam))
(msgbox (getRoot employee adam))
Note that in the above expressions, employe is translated by parser
into:
(firstNode (select * name (firstNode (select * symbol (select 'e' 'm'
'p' 'l' 'o' 'y' 'e')))))
And employee is translated by parser into: (firstNode (select * name (firstNode (select * symbol (select 'e' 'm' 'p' 'l' 'o' 'y' 'e' 'e')))))
Both of the above queries find the same verb instance whose name has two similar symbol strings. Received on Sat Apr 01 2006 - 14:13:40 CST
![]() |
![]() |