metametascape
Welcome, Guest
Please Login or Register.
Lost Password?
Re:Spacial:Available as a query (1 viewing)
_GEN_GOTOBOTTOM Post Reply

TOPIC: Re:Spacial:Available as a query

#71
ecasotti (User)
Expert Boarder
Posts: 38
graphgraph
Spacial:Available as a query 2008/01/19 21:25 Karma: 0  
If I make Spacial:Available as a query, and DO NOT us it with an ALL, I get
generated code that finds a random available cell, rather than performing
isAvailable()? The isAvailable() method seems more query-like than finding
an available cell.

If I do an evaluation (which I mentioned on another post I believe), then I
get generated code that generates an assignment, with the right side being
available(). Again, if this is intended, it should say isAvailble().

Wouldn't an evaluation want an available cell, and a query want to know if
it is available?
  The administrator has disabled public write access.
#77
miles (Admin)
Admin
Posts: 59
graph
Re:Spacial:Available as a query 2008/01/21 03:27 Karma: 1  
In almost all cases you will want a query not an evaluation as the point is that you are deciding wether to do something or not with the result. I noticed that in your example model you had evaluated whether something was available and then tested a condition of wether that was true. You don't need to do this -- just create an isAvailable query. Evaluations will come more into play perhaps when we flesh out support for spatial functions like "count".
  The administrator has disabled public write access.
#82
ecasotti (User)
Expert Boarder
Posts: 38
graphgraph
Re:Spacial:Available as a query 2008/01/21 13:01 Karma: 0  
As I stated in my other post, the problem with JUST using Available as
a query is it doesn't check if *this* hostcell is available, it finds
a random, available host cell. Believe me, I tried! My workaround
was evaluating which gives me (*sort of*) the isAvailable method. Then
performing a query on the evaluation result.
  The administrator has disabled public write access.
_GEN_GOTOTOP Post Reply
© Copyright 2007 Best of Joomla, Powered by FireBoardget the latest posts directly to your desktop