*** holycow has joined #gnuenterprise good morning Hi, I want the appserver to drop all instances of a class I found this function: delete (session_id session, string classname, stringlist object_ids) Do I have to name every object in object_ids or is there another way? *** reinhard has joined #gnuenterprise *** btami has joined #gnuenterprise Good morning reinhard and btami! If is not too early for a question...well I have one anyway: I want the appserver to drop all instances of a class I found this function: delete (session_id session, string classname, stringlist object_ids) Do I have to name every object in object_ids or is there another way? good morning *** kilo has joined #gnuenterprise good morning all rynik: you have to name every object object_id but I guess you were looking at the wrong point what you looked at is the RPC API in what context do you want to delete these instances? in a form trigger? in an appserver procedure? It's a script. I download a prize list and drop tth old one do you understand me? *** sjc has joined #gnuenterprise reinhard, I'd say its in a function of a class called by a script if it matters. reinhard, I havn't defined the class yet but I think it will be a descendant to GClientApp. ok the easy and "clean" way would be to make that a language.App descendant and do something like for x in find (...): x.delete () reinhard, thats it? the probably much faster way would be directly issue a DELETE sql statement to the database connection and "trick out" appserver but that's not clean :) yes, that's all but this will result in a DELETE sql statement for each single record No, you would bypass the OnDelete() right Thanks a lot. Hi again, Where is find defined and where is it documented? I understand from a conversation with mnemoc the other day that find behaves like the documented: list_id request (session_id session, string classname, stringlist conditions, stringlist sortorder, stringlist properties) I can't find (find)! I think I found find in session.find. http://www.gnuenterprise.org/tools/appserver/docs/manual/devguide/Procedures.html#Procedures but yes, session.find http://www.gnuenterprise.org/tools/appserver/docs/api/public/gnue.appserver.language.Session.Session-class.php#find Yes, right. The later I actually found as soon as I understood it was in session. Well documented to. Thanks for that. *** johannesV has joined #gnuenterprise *** docelic has quit IRC *** dcmwai has quit IRC *** johannesV_ has joined #gnuenterprise *** johannesV has quit IRC johannesV_: tamas:~/svn/berado/scripts$ ./setup-db.sh 'gnue.gsd' gsd fájl betöltése... ************************************************************ Logon for SYSDBA into Security Database DB000: Traceback (most recent call last): DB000: File "/home/tamas/svn/gnue/gnue-common/scripts/gnue-schema", line 31, in ? DB000: Scripter ().run () DB000: File "/home/tamas/svn/gnue/.cvsdevelbase/gnue/common/schema/scripter/Scripter.py", line 146, in run DB000: creator.createDatabase () DB000: File "/home/tamas/svn/gnue/.cvsdevelbase/gnue/common/datasources/drivers/interbase/Schema/Creation/Creation.py", line 62, in createDatabase DB000: res = loginHandler.askLogin (title, fields, {}, error) DB000: File "/home/tamas/svn/gnue/.cvsdevelbase/gnue/common/datasources/GLoginHandler.py", line 113, in askLogin DB000: result = self._askLogin (title, fields) DB000: File "/home/tamas/svn/gnue/.cvsdevelbase/gnue/common/datasources/GLoginHandler.py", line 209, in _askLogin DB000: value = getpass.getpass (" %s: " % label) DB000: File "/usr/lib/python2.3/getpass.py", line 35, in unix_getpass DB000: passwd = _raw_input(prompt) DB000: File "/usr/lib/python2.3/getpass.py", line 74, in _raw_input DB000: prompt = str(prompt) DB000: UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 7: ordinal not in range(128) value = getpass.getpass (" %s: " % label) seems like this should be a label.encode (i18n.getencoding ()) *** yure has joined #gnuenterprise *** johannesV_ has quit IRC reinhard: thx, committed *** johannesV has joined #gnuenterprise *** tiredbones has joined #gnuenterprise johannesV, reinhard: what does the 'reference type not allowed' error msg means exactly? trying to pass a class as a parametere it means that you can't pass an object as parameter you have to pass the gnue_id of the object and in the procedure, get() the object from the gnue_id damn, I think get() is still missing in the docs session.get (classname, gnue_id) returns exactly *that* object wow, get() *is* documented :) may i not pass a class to a procedure in a gcd file? i thought it was automatic via gnue_ids... and it used to work this way kilo, you procedure's parameter will be of type string then ... and i get ok, so szerzodo parameter will be of type="string" readgcd: Reference 'szemely_szerzodo' not allowed for 'GCParameter' instance szerzodo that's right but it USED TO work this way * kilo goes bruhahahahaha yeah, but this was quite long ago and it was a bug :) a feature ! :) never remove a bug, you will always find people rely on it ;-) *lol* !slap those Austrians... a feature would have been if it *really* would have been converted back into an object inside the procedure yeah, just thinking about something like that so if you pass an object, you also get an object not if you pass an object, you get a string but it would mean a change in common.logic.* which does not know anything about params, types and the like but we would be opening a can of worms with that IMHO yes no as next would be returning an object from a procedure then how would you call that procedure from say a forms trigger which doesn't have an idea of objects who would ever ask for that? :D and after that, people would ask to be able to pass a list of objects to a procedure :)))))))))99 or return a list of objects who would EVER ask for that? :D or return a tuple containing a list of objects and an integer and at some point we could simply forget about type checking at all yeah, pass me back a good old pointer like in C right :) and then you have to be aware that at some point the called procedure might run in a different process than the caller maybe even on a different machine i think it would greatly simplify procedures' code I do agree and I always saw it as something of the type "we might at some point want to add this to appserver" we have many places in our gcd's where used _that_ parameter styles now i have to change all to "id", and add another line "sessionget(...) ? i mean session.get (classname, gnue_id) if you passed that parameter, you were able to access that object then??? this would be a feature we would have implemented accidentally :) reinhard, what is xmlrpc.python2rpc doing with such an instance object ? does it repr() it ? in fact they were in use like that jogviszonyok = find('JOGV_Jogviszony', {'JOGV_szerzodo': szerzodo}, [], []) but not in a way like szerzodo.something another question: what do you think to support raw (but using fully qualifyed names) where clauses in find ? or is it impossible technically? kilo: ah, ok, this would go if you just pass gnue_id instead of the object btami: currently this is not possible, and I would wonder what you would need it for it would probably not be very portable across databases if it contains special code it's just for more readabla code nothing more ah ok so it's not that you are trying to do something you can't express in prefix notation no yes, prefix notation can become quite ugly if it's long expressions yep ok, have to go for kids, bbl *** btami has quit IRC *** titopbs has quit IRC *** jamest has joined #gnuenterprise *** kilo has quit IRC *** titopbs has joined #gnuenterprise bbl Can I assign values in an instance of an appserver class in a positional maner like: instance = session.new ('module_class') instance = ['a', 'b', 'c'] rynik, no you can't I thought so :) which properties should then be modified ? All, in the order they were defined. :) which order is that ? Or, if less than all, the first. there is no order in properties The order? Oh, thats plain to see in the gcd as they might change through extension (someone installs other gcd's) or through permissions (like one users has more than another one) and maybe there will be another mechanism than gcd introducing new props (in a future version) so per definition: properties on object do not have any order Yes, I can see it's for the best. Benefits would be small anyway. rynik, there might be a number of gcd's all extending a given class, but no gcd knows of each other ... Yes I see. The order in wich the gcds where introduced to the appserver would matter. exactly Hairy... :) I'm gona follow btamis example and run for kids, see you. bye rynik *** tiredbones has quit IRC *** wt has joined #gnuenterprise *** johannesV_ has joined #gnuenterprise *** johannesV has quit IRC *** jcater has joined #gnuenterprise *** SachaS has quit IRC hi, i did my first-step migration from dbf to appserver (HEAD) but it took about 50 minutes importing around 7000 O(1) records, and 2000 O(3) records.... i leave open transactions to postgres and ate lot of memory is that 'expected'? .oO( i can show my language.app if anyone wants to revirew it ) *** holycow has quit IRC mnemoc, I'd like to see your app. Mostly so that I can learn from it. Can you put it someware public? sure queried because i don't want my svn on google *** kilo_ has joined #gnuenterprise *** btami has joined #gnuenterprise mnemoc: no, it is not expected and you probably miss some "close" statements you have to close resultsets off to lug meeting cu all *** reinhard has quit IRC *** titopbs has quit IRC *** btami has quit IRC *** dimas has joined #gnuenterprise hello all *** wendall911 has joined #gnuenterprise *** johannesV_ has quit IRC *** yure has quit IRC *** SachaS has joined #gnuenterprise *** johannesV has joined #gnuenterprise *** yure has joined #gnuenterprise *** johannesV has quit IRC *** yure has quit IRC *** yure has joined #gnuenterprise *** yure has quit IRC *** mnemoc_ has joined #gnuenterprise *** mnemoc has quit IRC *** jamest has left #gnuenterprise *** wt has quit IRC *** yure has joined #gnuenterprise *** kilo_ has quit IRC *** joel_leon has joined #gnuenterprise *** joel_leon has left #gnuenterprise *** SachaS has quit IRC *** wendall_away has quit IRC *** yure has quit IRC *** dcmwai has joined #gnuenterprise *** sjc has quit IRC *** SachaS has joined #gnuenterprise *** dimas has quit IRC *** holycow has joined #gnuenterprise