Hi, I have a problem with declaring a OQL function.
I'm connecting to DB with eyedboql tool and I'm creating a simple function:
function checkMe(Lg, Ps){
return((count(select u from User u where u.login=Lg and u.password=Ps)) != 0);
};
after that it's visable in oql$functions variable, and I can using it just fine.
Problem is, when I commit this and connect again with eyedboql, my function isn't there.
When I'm trying to run it, I get:
"
? checkMe("a","b");
near line 2: 'checkMe("a","b")' => oql error: function call 'checkMe("a","b"); ' : unknown function 'checkMe'.
"
Is this a bug? I'm new to OODB, but for example in PostgresSQL you can create a global function in similar way.
I've tried also adding code of this function in ODL file in "%oql{ ... %}" code block but it wasn't syntax correct.
Is this "only for a session function" a bug or I'm doing something wrong?
Regards, Rom
I've discover, that when I'm adding my sample function to "<EYEDB_INSTALLATION_DIR>/lib/eyedb/oql/stdlib.oql" file, then it's working ok, but this function is available in all databases.
Somebody know a solution for this problem? How to add a OQL function for one single database, not for all?
Regards, Rom