You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(35) |
Nov
(38) |
Dec
(112) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(20) |
Feb
(24) |
Mar
(47) |
Apr
(18) |
May
(28) |
Jun
(17) |
Jul
(15) |
Aug
(40) |
Sep
(14) |
Oct
(5) |
Nov
(26) |
Dec
(31) |
2003 |
Jan
(8) |
Feb
(14) |
Mar
(38) |
Apr
(34) |
May
(33) |
Jun
(32) |
Jul
(24) |
Aug
(9) |
Sep
|
Oct
(20) |
Nov
(43) |
Dec
(22) |
2004 |
Jan
(23) |
Feb
(25) |
Mar
(15) |
Apr
(3) |
May
(31) |
Jun
(13) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(15) |
Nov
(3) |
Dec
(5) |
2005 |
Jan
|
Feb
|
Mar
(16) |
Apr
(24) |
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(4) |
Oct
|
Nov
(3) |
Dec
(2) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Vsevolod (S. I. <si...@cs...> - 2004-01-05 15:21:54
|
Chris, > Seriously, if we didn't lc the fieldnames in the tie implementation we'd > be in a world of hurt -- is this field loaded, is this field changed, > and similar checks would be more error prone. But these should be > encapsulated in the tie implementation and I'm not sure why you'd care > about them. I care because I can't use field names with uppercase letters! :) > Yeah, that's what my idea was too. The only problem with this is we're > treading dangerously close into parsing and I really don't want to do that. > I guess we can keep it simple and pull out all the foo.bar strings, see > if 'foo' is an alias and if so add the proper linking clause. (We do > this in OpenInteract::Common and OpenInteract2::Action::CommonSearch to > build search queries.) Sounds like a good idea. >> After I get a bit more familiar with SPOPS, let me know if I can give >> you a hand with this. > > > Be careful what you wish for :-) Being purely selfish - I want to have a robust and maintainable persistence layer for my apps. :) Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2004-01-05 12:27:49
|
On Jan 5, 2004, at 7:06 AM, Vsevolod (Simon) Ilyushchenko wrote: >> Where is this giving you a problem? I probably did this to ensure >> that everything was handled consistently internally. > > It happens once in SPOPS::Tool::DBI::DiscoverField and a whopping > eight times :) in SPOPS::Tie. Arg! I hate tie! It's caused nothing but pain! Seriously, if we didn't lc the fieldnames in the tie implementation we'd be in a world of hurt -- is this field loaded, is this field changed, and similar checks would be more error prone. But these should be encapsulated in the tie implementation and I'm not sure why you'd care about them. > The script is cool (I did not know you could do that :), but my > problem is similar to your Pittsburgh example. My code looks similar. > But if the definition of Person has_a Address, it feels redundant to > specify the "person.address_id = address.address_id" clause. (And the > clauses for links_to classes are even bulkier.) > > I wish I could just automagically say > my $people = Person->fetch_group({ > where => "city = 'Pittsburg'}); You're right, you should be able to do that. > Of course, if more than one dependent class of Person has the 'city' > field, there has to be a way of choosing the one we need. Perhaps it > can be prefixed: "address.city='Pittsburg'", where "address" is not > the name of the table with addresses, but the alias of the address_id > field in Person. Then the table structure is nicely abstracted away. > :) Yeah, that's what my idea was too. The only problem with this is we're treading dangerously close into parsing and I really don't want to do that. I guess we can keep it simple and pull out all the foo.bar strings, see if 'foo' is an alias and if so add the proper linking clause. (We do this in OpenInteract::Common and OpenInteract2::Action::CommonSearch to build search queries.) > I saw the note by Ray Zimmerman mentioned in your documentation and > already ran into some of its issues with the order of saving of the > contained classes (for a new object, the has_to classes have to be > saved first, then their ids should be given to the top-level object, > then this object should be saved, then its id should be used to save > the links_to objects). Right... I want to make this lazy (that is, not evaluate ID fields and the like at generate time) and therefore not require any processing order. > After I get a bit more familiar with SPOPS, let me know if I can give > you a hand with this. Be careful what you wish for :-) Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2004-01-05 12:07:04
|
Chris, >> 1. Why do you lowercase field names? Can this be a configuration >> option instead? > > > Where is this giving you a problem? I probably did this to ensure that > everything was handled consistently internally. It happens once in SPOPS::Tool::DBI::DiscoverField and a whopping eight times :) in SPOPS::Tie. > I'm not exactly sure what you mean, but you can specify join clauses in > the fetch_group: > > my $people = Person->fetch_group({ > where => "address.city = ? AND person.address_id = address.address_id, > from => [ 'address', 'person' ], > value => [ 'Pittsburgh' ], > }); > > I'll make a change so you don't need to add 'person' (the table of the > class we're querying) to the 'from' list. (That's kind of annoying...) > You can also pass where clauses to the generated links_to method. The > attached script is an example (standalone, uses SQLite). The script is cool (I did not know you could do that :), but my problem is similar to your Pittsburgh example. My code looks similar. But if the definition of Person has_a Address, it feels redundant to specify the "person.address_id = address.address_id" clause. (And the clauses for links_to classes are even bulkier.) I wish I could just automagically say my $people = Person->fetch_group({ where => "city = 'Pittsburg'}); Of course, if more than one dependent class of Person has the 'city' field, there has to be a way of choosing the one we need. Perhaps it can be prefixed: "address.city='Pittsburg'", where "address" is not the name of the table with addresses, but the alias of the address_id field in Person. Then the table structure is nicely abstracted away. :) > Beyond that... the whole links_to/fetch_by stuff has been kind of > stagnant for quite some time. It needs to be revisited and perhaps > rethought a bit... I saw the note by Ray Zimmerman mentioned in your documentation and already ran into some of its issues with the order of saving of the contained classes (for a new object, the has_to classes have to be saved first, then their ids should be given to the top-level object, then this object should be saved, then its id should be used to save the links_to objects). After I get a bit more familiar with SPOPS, let me know if I can give you a hand with this. Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2004-01-05 11:40:05
|
On Dec 29, 2003, at 9:21 AM, Teemu Arina wrote: > I'm using OpenInteract 1.60. > > I noticed a problem with Stash class. I might be wrong but my > understanding is > that the Stash class makes sure you can run several different > OpenInteract > websites on one Apache mod_perl server without any problems. That was its original intent. Unfortunately a number of other problems get in the way and this doesn't work properly. That's why I removed this non-feature entirely for OI2. Sorry for the bad news... Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Chris W. <ch...@cw...> - 2004-01-05 04:48:21
|
Whoops... forgot to attach the script. Chris |
From: Chris W. <ch...@cw...> - 2004-01-05 04:39:38
|
On Jan 3, 2004, at 6:04 PM, Vsevolod (Simon) Ilyushchenko wrote: > Welcome back and happy new year! Thanks, and the same to you! I've also been heads down on a separate project that will hopefully get released soon.... > A couple of issues cropped up: > > 1. Why do you lowercase field names? Can this be a configuration > option instead? Where is this giving you a problem? I probably did this to ensure that everything was handled consistently internally. > 2. This is probably asking for too much, but is it possible to call > fetch_group on classes with 'has_a' and 'link_to' attributes with the > 'where' filters specifying fields of the dependent classes? Unless I > missed the official way of doing this, I have to do it manually for > now. (If you do decide to implement this, keep in mind the fun issue > of inner vs outer joins - a search for the null value of the dependent > field may return valid top-level rows that do not have dependent > records). I'm not exactly sure what you mean, but you can specify join clauses in the fetch_group: my $people = Person->fetch_group({ where => "address.city = ? AND person.address_id = address.address_id, from => [ 'address', 'person' ], value => [ 'Pittsburgh' ], }); I'll make a change so you don't need to add 'person' (the table of the class we're querying) to the 'from' list. (That's kind of annoying...) You can also pass where clauses to the generated links_to method. The attached script is an example (standalone, uses SQLite). Beyond that... the whole links_to/fetch_by stuff has been kind of stagnant for quite some time. It needs to be revisited and perhaps rethought a bit... > I also sent a couple of questions around Christmas time - hopefully > you'll find them among the deluge of spam. :) I'll try and find them :-) Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2004-01-03 23:05:00
|
Chris, Welcome back and happy new year! A couple of issues cropped up: 1. Why do you lowercase field names? Can this be a configuration option instead? 2. This is probably asking for too much, but is it possible to call fetch_group on classes with 'has_a' and 'link_to' attributes with the 'where' filters specifying fields of the dependent classes? Unless I missed the official way of doing this, I have to do it manually for now. (If you do decide to implement this, keep in mind the fun issue of inner vs outer joins - a search for the null value of the dependent field may return valid top-level rows that do not have dependent records). I also sent a couple of questions around Christmas time - hopefully you'll find them among the deluge of spam. :) Thanks, Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2004-01-02 18:07:42
|
* forehead (for...@4r...) [040102 11:28]: > I just use the TT2Process modules from OpenInteract 1.99 > to start my multi-style site project. all the small stuff > viewed as widget and thought a::b::c like style to include. > > so one application page has many such widget to include and > more complex TT2 template to handle, but my program is very slow, > and i can't afford it, average the page needs > > 1.00 usr + 0.01 sys = 1.01 CPU > > to fullfill the task.and the major time sucking is in TT2 process > directive, although the TT2Plugin not complex.\ > > any idea to enhance the performance for my cgi program? > it's confusing me about many weeks! Using CGI? We're kind of barking up the wrong tree here. The CGI mode is primarily meant for debugging, quickstart and single-user implementations, not for heavy production use. That is, you're doing a LOT of work on every single request: - read in the server configuration - read in the package listing (repository) - read in all SPOPS definitions and generate a class for each - read in all action definitions and generate a URL mapping for each - read in any custom TT2 processing from the packages - do a 'require' on all necessary modules (core modules and packages) - create a database handle And that's before we do any processing on the request! For single users this is a slight delay but it's generally acceptable. For multi-user sites I'd imagine it's intolerable. That said, if you've actually found TT2 is your bottleneck you should check to see if it's compiling the templates and caching the results. See: $WEBSITE_DIR/cache/tt. If it's empty that means you're not caching anything or you're cleaning it up with every request. Try setting the server configuration 'template_process.main.compile_cleanup' to 0 so the compiled files won't get cleaned up every time. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988 |
From: forehead<for...@4r...> - 2004-01-02 16:08:36
|
hi, openinteract-help I just use the TT2Process modules from OpenInteract 1.99 to start my multi-style site project. all the small stuff viewed as widget and thought a::b::c like style to include. so one application page has many such widget to include and more complex TT2 template to handle, but my program is very slow, and i can't afford it, average the page needs 1.00 usr + 0.01 sys = 1.01 CPU to fullfill the task.and the major time sucking is in TT2 process directive, although the TT2Plugin not complex.\ any idea to enhance the performance for my cgi program? it's confusing me about many weeks! help~~~~ ---------------------- forehead (Chun Sheng) for...@4r... 2004-01-03 |
From: Teemu A. <te...@io...> - 2003-12-29 14:22:27
|
Hi, I'm using OpenInteract 1.60. I noticed a problem with Stash class. I might be wrong but my understanding is that the Stash class makes sure you can run several different OpenInteract websites on one Apache mod_perl server without any problems. I have a mod_perl server with two different OpenInteract websites running on different virtual hosts, both configured with their own httpd_modperl_solo.conf with virtualhost configurations and with different databases. Both have different OIStashClass and startup.pl. Lets say that on website #1 (configuration Included first in my apache.conf) I have the following additional SPOPS objects installed: course student Which both I can access through $R->[object] without problems. On website #2 however (configuration included second in apache.conf) I have the following SPOPS objects installed: course teacher I can access course without problems through $R. But $R->teacher->fetch_group() however results in the following error: Can't locate object method "teacher" via package "OpenInteract::Request". Strangely, I'm able to access $R->student from website #2, which is not installed on website #2! (but it doesn't work as it should, because I don't have such a table in the database of website #2). If I disable website #1 on my webserver, website #2 works as it should. $R->teacher works as it should. I also noticed that on website #2, defining new object classes for $R in system_alias configuration in server.ini doesn't work. Seems like website #2 accesses the object class aliases from website #1, which is loaded first into our Apache. It seems like everything in this Stash works (actions, own database connections, other configuration options...) expect object class aliases for $R. Just to let you know, oi_manage list_objects for website #2 returns the correct list of installed objects and there is no sign of student there, but the site still works the other way around. I know the Stash implementation is a little bit of a hack, but this hack obviously does something wrong at the moment. Currently I have to work-around this problem by running separate apaches on one server, which is maybe more clever anyway. - Teemu Arina |
From: Vsevolod (S. I. <si...@cs...> - 2003-12-23 17:12:34
|
> Coincidentally, I made a change in 0.80 that allows you to do: > > SPOPS class: SPOPS_Books > Your class: MyBooks isa SPOPS_Books > SPOPS class: SPOPS_Publisher > Your class: MyPublisher isa SPOPS_Publisher > > Then declare in your publisher configuration: > > links_to => { MyBooks => 'link_table' } Chris, I may be doing something wrong, but I hit another snag. I am trying to use objects that refer to each other, and I use links_to in both configuration. (I call them Job and Task, but they are similar in their relationship to Publisher and Book). I attach the four class files and the script that tries to use them. I inherit Job from SPOPS_Job and Task from SPOPS_Task. The SPOPS configuration refers to Common.pm, which would be different in your case. There are four possible configurations: SPOPS_Job links to SPOPS_Task, SPOPS_Task links to SPOPS_Job SPOPS_Job links to Task, SPOPS_Task links to SPOPS_Job SPOPS_Job links to SPOPS_Task, SPOPS_Task links to Job SPOPS_Job links to Task, SPOPS_Task links to Job The first three work, but the last one, which is of greater interest, does not. Could you please look at this and tell me if I am doing anything wrong? The error message is: Cannot run behavior in [links_to] [SPOPS_Job]: Failed to retrieve configuration from Compilation failed in require at Job.pm line 5. The tables that the config files refer to are created thusly: CREATE TABLE `Job` (`job_id` int(11)); CREATE TABLE `Task` (`task_id` int(11)); CREATE TABLE `JobToTask` (`id` int(11), `job_id` int(11), `task_id` int(11)); Merry Christmas! Thanks, Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Vsevolod (S. I. <si...@cs...> - 2003-12-22 19:51:52
|
Chris, > Coincidentally, I made a change in 0.80 that allows you to do: > > SPOPS class: SPOPS_Books > Your class: MyBooks isa SPOPS_Books > SPOPS class: SPOPS_Publisher > Your class: MyPublisher isa SPOPS_Publisher Thanks! This almost works out for me. But here is the problem: my classes have a superclass. Let's call it MyObject. So I inherit MyBooks from SPOPS_Books and MyObject. I have to double-dispatch the new() method, but I can live with it. However, I use strict field checking and field autodiscovery. When I begin to store attributes in MyObject via the regular Perl getter/setter methods which use $self as a hashref, I start to get SPOPS errors about accessing fields that are not present. Obviously, I can turn strict fields off, but I'd like to retain that. The alternative is to somehow keep autodiscovery, but add in the config hash of SPOPS_Books additional fields which correspond to "instance variables" of MyObject. I am not sure how to do it, but even if I could, it's messy because I'll have to repeat it in every SPOPS_* class. This can be made a little less messy if I do not inherit from MyObject, but store a reference to it, but this one reference still has to be mentioned in SPOPS config. Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2003-12-20 16:46:52
|
On Dec 19, 2003, at 5:25 PM, Vsevolod (Simon) Ilyushchenko wrote: > ... > So far this worked out well until I started using 'links_to'. Assume > that MyPublisher and MyBook are my classes, SPOPS_Publisher and > SPOPS_Book are SPOPS classes. Instances of MyPublisher refer to > instances of SPOPS_Publisher, instances of MyBooks refer to instances > of SPOPS_Books. Right -- I think it's easier (now) to make MyBooks a subclass of SPOPS_Books (more below) > The expected object behavior is this: > > $aMyPublisher->books produces an array of MyBooks. > > In actuality, > > $aMyPublisher->books produces an array of SPOPS_Books. > > Is it possible to generate the desired result without straining the > framework too much? Looks like I can achieve this by mucking around in > SPOPS::ClassFactory::DBI and providing some kind of callbacks within > the get/add/remove functions, but I'd like to get an official word > first Coincidentally, I made a change in 0.80 that allows you to do: SPOPS class: SPOPS_Books Your class: MyBooks isa SPOPS_Books SPOPS class: SPOPS_Publisher Your class: MyPublisher isa SPOPS_Publisher Then declare in your publisher configuration: links_to => { MyBooks => 'link_table' } So you can use your subclass ('MyBooks') rather than the SPOPS-generated class as the class to link to. I know this goes against the GoF declaration to 'Prefer composition over inheritance', but it is a much cleaner solution that using the 'code_class' configuration item (crazy idea that). I've modified all the code in OpenInteract2 to use this pattern, naming the SPOPS-generated classes 'FooPersist' for clarity. The only caveat is that you cannot 'use base' to declare the parent relationship; you need to use @ISA explicitly: package MyBooks; @MyBooks::ISA = qw( SPOPS_Books ); sub my_custom_sub { ... } The change in SPOPS 0.80 to enable this was just to do a 'require' on the class specified in has_a and links_to before using it in the code generation process. Hope that makes sense. Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2003-12-19 22:26:16
|
Chris, Finally, an non-trivial question. :) I am implementing a hierarchy of objects, each of which owns an SPOPS object. (I tried to not separate them, inheriting my classes both from SPOPS and from my superclass, but the new() methods collided, and multiple inheritance is not a good idea anyway). So far this worked out well until I started using 'links_to'. Assume that MyPublisher and MyBook are my classes, SPOPS_Publisher and SPOPS_Book are SPOPS classes. Instances of MyPublisher refer to instances of SPOPS_Publisher, instances of MyBooks refer to instances of SPOPS_Books. The expected object behavior is this: $aMyPublisher->books produces an array of MyBooks. In actuality, $aMyPublisher->books produces an array of SPOPS_Books. Is it possible to generate the desired result without straining the framework too much? Looks like I can achieve this by mucking around in SPOPS::ClassFactory::DBI and providing some kind of callbacks within the get/add/remove functions, but I'd like to get an official word first. As for my previous question, > It should print out: > Can it before? no > Can it after? yes Precisely - I checked it. > I agree that they should both say 'yes' and I'll see about making that > happen. Thanks! Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2003-12-19 00:49:01
|
On Dec 18, 2003, at 6:58 PM, Vsevolod (Simon) Ilyushchenko wrote: > Another nitpick: after using AUTOLOAD in subclasses of objects owning > SPOPS objects (don't ask :) I found out that the can() method of SPOPS > objects does not return true if you give it the autodiscovered column > name. It would be neat if it did. Does it work once you call the parameter? That is, if you do: SPOPS::Initialize->process( ... ); my $foo = Foo->new(); print "Can it before? ", $foo->can( 'bar' ) ? 'yes' : 'no', "\n"; $foo->bar( 'baz' ); print "Can it after? ", $foo->can( 'bar' ) ? 'yes' : 'no', "\n"; It should print out: Can it before? no Can it after? yes I agree that they should both say 'yes' and I'll see about making that happen. Later, Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2003-12-18 23:58:15
|
Chris, Another nitpick: after using AUTOLOAD in subclasses of objects owning SPOPS objects (don't ask :) I found out that the can() method of SPOPS objects does not return true if you give it the autodiscovered column name. It would be neat if it did. Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2003-12-15 14:05:48
|
Teemu Arina wrote: > I was playing around with OpenInteract themes and noticed something that > should work differently in my opinion (maybe a bug?): > > In server.ini I have default_objects.theme = 2 > > I have two users, superuser and testuser. superuser has theme_id = 1 in the > sys_user table and testuser has theme_id = 2. > > Now, when I set session_info.cache_theme = 30 in the server.ini and log in as > testuser, I get theme id 2. That's okay... > Now I log off and log back in as superuser. I get theme id 2 instead of theme > id 1 (?) That's not. The session data aren't being cleared out, it sounds like. That's definitely a bug. I'll look into it. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Teemu A. <te...@io...> - 2003-12-15 12:17:32
|
Hello, I was playing around with OpenInteract themes and noticed something that should work differently in my opinion (maybe a bug?): In server.ini I have default_objects.theme = 2 I have two users, superuser and testuser. superuser has theme_id = 1 in the sys_user table and testuser has theme_id = 2. Now, when I set session_info.cache_theme = 30 in the server.ini and log in as testuser, I get theme id 2. Now I log off and log back in as superuser. I get theme id 2 instead of theme id 1 (?) I set session_info.cache_theme = 0 and try the same procedure again. Now superuser gets the correct theme id 1. It seems like when cache is turned on, I get the theme which was cached first, no matter if that theme was for another user. The only way to work around this problem I have found so far is turning off theme caching. Is this a bug or a feature? -- Sincerely, Teemu Arina www.mimerdesk.org |
From: Chris W. <ch...@cw...> - 2003-12-12 11:33:02
|
* Vsevolod (Simon) Ilyushchenko (si...@cs...) [031211 16:13]: > >One note on this: the 'skip_undef' feature may help, since it will not > >include ANY fields in an insert or update that are undefined. > > I tried that (assume here that field2 is undef): > > INSERT INTO table (field1, field2) VALUES (value1, ); > > So it fails too. :( > > I think this and the previous bug only happens with numeric fiels. I think the 'skip_undef' part gets triggered before they get to SPOPS::SQLInterface and thus before the datatypes are checked. So I'm not sure this is a type issue (could be wrong). In any case, I will clearly have to investigate this some more and write some tests to exercise the behavior. More soon, thanks for the report. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2003-12-11 20:56:10
|
> One note on this: the 'skip_undef' feature may help, since it will not > include ANY fields in an insert or update that are undefined. Chris, I tried that (assume here that field2 is undef): INSERT INTO table (field1, field2) VALUES (value1, ); So it fails too. :( I think this and the previous bug only happens with numeric fiels. Thanks, Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2003-12-11 08:33:21
|
* Vsevolod (Simon) Ilyushchenko (si...@cs...) [031210 16:57]: > I may have gotten lazy, but here is a feature that could be useful. If a > certain field is not set in the object, the SQL statements that are > generated to insert or update values do not contain *any* value for that > field. Thus, they are syntactically invalid: > > update table set field1 = value1, field2 = , field3 = value3, ... Oh, that's clearly wrong. > Obviously, I can work around this in the application code, but it would > be really cool if for fields that can be NULL SPOPS would automatically > put NULL into the SQL code if the value is not defined. No, you shouldn't have to work around this. I'll look into it. One note on this: the 'skip_undef' feature may help, since it will not include ANY fields in an insert or update that are undefined. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2003-12-10 21:38:21
|
Chris, I may have gotten lazy, but here is a feature that could be useful. If a certain field is not set in the object, the SQL statements that are generated to insert or update values do not contain *any* value for that field. Thus, they are syntactically invalid: update table set field1 = value1, field2 = , field3 = value3, ... Obviously, I can work around this in the application code, but it would be really cool if for fields that can be NULL SPOPS would automatically put NULL into the SQL code if the value is not defined. Thanks, Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Steve S. <ste...@co...> - 2003-12-05 22:23:48
|
So I've gotten further. I'm building a documentation class for docs. we have outside of OI, using the system_doc package as a model. So far, so good. I have a design question: One part of this package will be a set of matching rules that will categorize our packages. This can be done with an array of hashes in Perl. I think it makes sense to define those rules as SPOPS data for my package. Once I've done that, I assume that there's nothing bad about either handing all that back to the template, or having my handler use it directly? The reason I ask is that all examples seem to hand it up to the template. I have at least one method in my handler where it seems to make sense to fetch_group, then directly (in the handler method) iterate and filter to pare down what I return to the template. Is there any downside to this? Anything that goes against good design? -- Steve Sapovits ste...@co... |
From: Steve S. <ste...@co...> - 2003-12-04 22:43:48
|
I asked: > Assuming I did screw up (probably a safe assumption 8-), how safe is it to > move things where they belong? This was relatively easy. I do not appear to have broken anything. -- Steve Sapovits ste...@co... |
From: Steve S. <ste...@co...> - 2003-12-04 18:58:50
|
Chris Winters <ch...@cw...> wrote: > The latter. There's a catalog (for lack of a better word) of the > packages installed to the repository at: > > $REPOSITORY/conf/package_repository.perl I got that one and it was (I think) still complaining. But I may have other issues ... > Here are the players: > > base repository - maintains a copy of all packages installed to OI; > this is where 'install_package' puts the files; (This is what you'd set > the 'OPENINTERACT' environment variable to as a shortcut.) I normally > create this in /opt/OpenInteract, but your layout may vary. > > website - all the packages (plus old copies) for a particular > website; this is where 'apply_package' or 'upgrade_package' puts the > files and metadata, and where your website actually runs from. I > normally create these under /home/httpd with the site name as the > directory (e.g., /home/httpd/mysite.com, /home/httpd/funyuns.com, etc.) > Under the main site directory are the top-level OI directories: conf/, > pkg/, html/, log/, etc. > > Each website is associated with a base repository from which it > draws the package information when 'apply_' or 'upgrade_package' is run. > So when you 'install_package' it gets put into the base repository and > is then available to all websites associated with that repository. > > Does that make sense? It makes sense, but I believe I screwed up. Some of the site directories you mention are one level up at the base site directory. I think I created the site, but then gave a site directory of the site base in subsequent oi_manage commands. But my site is working ... except for that removal. I'll have to poke around. Since it's a single site, I may have just done it that way. So I have /usr/local/sites. My site name (not real) is XXXX and I have a /usr/local/sites/XXXX with only a Stash.pm in it -- conf, html, logs, doc, data, cache, etc. are all under /usr/local/sites. Assuming I did screw up (probably a safe assumption 8-), how safe is it to move things where they belong? Or is it easiest to just re-run the site installation the right way? I have not changed a lot but I have changed some aspects of the site. I wouldn't want to lose those changes. I can manually change database entries if needed. -- Steve Sapovits ste...@co... |