Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#238 closed enhancement (fixed)

SELECT INTO in rasql

Reported by: Dimitar Misev Owned by: Dimitar Misev
Priority: minor Milestone: 8.4
Component: qlparser Version: 8.3
Keywords: Cc: Peter Baumann
Complexity: Medium

Description

It would be helpful if rasql supports a SELECT INTO construct that would allow to directly insert the result of a SELECT query into a specified collection. The syntax in SQL which can be adopted by rasql too is

SELECT generalExp
INTO   newCollection
FROM   collectionList
[ WHERE ... ]

Change History (5)

comment:1 by Peter Baumann, 11 years ago

also, adding TEMPORARY is something useful: keep until end of transaction. Internally, this mechanism could be used for mixed query processing in future.

comment:2 by Peter Baumann, 11 years ago

also, adding TEMPORARY is something useful: keep until end of transaction. Internally, this mechanism could be used for mixed query processing in future.

comment:3 by Dimitar Misev, 11 years ago

TEMPORARY would only be useful in the implementation of nested queries I suppose?

comment:4 by Dimitar Misev, 11 years ago

Resolution: fixed
Status: newclosed

comment:5 by Dimitar Misev, 11 years ago

The patch extends the SELECT statement to include an INTO clause, I believe the ticket description is all the documentation needed.

The type of the new collection is automatically created and everything is automatically set up. If a collection already exists then the new MDD is added to it, unless the types don't match in which case an error is thrown.

Scalar results can not be inserted with a SELECT/INTO, this only works with MDD results.

Note: See TracTickets for help on using tickets.