Storm needs to support INSERT INTO ... SELECT

Bug #613300 reported by Steve Kowalik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
Fix Released
Undecided
William Grant

Bug Description

Storm currently doesn't support INSERT with a sub-SELECT, which would be a nice to have to Storm-ify a function used by InitialiseDistroSeries (was IDistroSeries.initialiseFromParent), such as:

self._store.execute('''
INSERT INTO ComponentSelection (distroseries, component)
SELECT %s AS distroseries, cs.component AS component
FROM ComponentSelection AS cs WHERE cs.distroseries = %s
''' % sqlvalues(self.distroseries.id,
self.distroseries.parent_series.id))

Revision history for this message
James Henstridge (jamesh) wrote :

In the latest version of Storm, we can create a Select() expression from a ResultSet, which probably covers the first part of this. What I don't think we have is a way to compile the outer INSERT statement, or any higher level API for it.

William Grant (wgrant)
Changed in storm:
assignee: nobody → William Grant (wgrant)
status: New → Fix Committed
milestone: none → 0.20
Changed in storm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.