The sample DataBlade module defines the following four operators that can be used on columns of data type MyShape, MyBox, MyCircle, and MyPoint in the WHERE clause of a query:
These operators, of course, are also the strategy functions defined by the operator class.
The following example uses the Overlap operator to return all the boxes in the box_tab table that overlap a box whose lower-left coordinate is (30,20) and upper-right coordinate is (60,50):
SELECT * FROM box_tab WHERE Overlap (boxes, 'box(30,20,60,50)' );
id 1 boxes box(10,10,40,40)
The following example uses the Contains operator to return all the boxes in the box_tab table that contain a box whose lower-left coordinate is (-5,-10) and upper-right coordinate is (2,5):
SELECT * FROM box_tab WHERE Contains (boxes, 'box(-5,-10,2,5)' );
id 2 boxes box(-10,-20,5,9)Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]