Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#238 closed enhancement (fixed)

SELECT INTO in rasql

Reported by: dmisev Owned by: dmisev
Priority: minor Milestone: 8.4
Component: qlparser Version: 8.3
Keywords: Cc: pbaumann
Complexity:

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 Changed 5 years ago by pbaumann

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 Changed 5 years ago by pbaumann

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 Changed 5 years ago by dmisev

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

comment:4 Changed 5 years ago by dmisev

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 5 years ago by dmisev

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.