comparison pkg/imports/sec.go @ 3307:b90b17d0b5a9 sections-backend

added sections_geoserver view, renamed stretch column to section in schema
author Markus Kottlaender <markus@intevation.de>
date Fri, 17 May 2019 11:28:20 +0200
parents bfde4f8dd323
children f10d606b2931
comparison
equal deleted inserted replaced
3305:5932f9574493 3307:b90b17d0b5a9
99 ) AS r), 99 ) AS r),
100 axs AS ( 100 axs AS (
101 SELECT ISRSrange_axis((SELECT r FROM r), $16::double precision) AS axs) 101 SELECT ISRSrange_axis((SELECT r FROM r), $16::double precision) AS axs)
102 INSERT INTO waterway.sections ( 102 INSERT INTO waterway.sections (
103 name, 103 name,
104 stretch, 104 section,
105 area, 105 area,
106 objnam, 106 objnam,
107 nobjnam, 107 nobjnam,
108 date_info, 108 date_info,
109 source_organization 109 source_organization
119 $14, 119 $14,
120 $15) 120 $15)
121 RETURNING id` 121 RETURNING id`
122 ) 122 )
123 123
124 // StageDone moves the imported stretch out of the staging area. 124 // StageDone moves the imported section out of the staging area.
125 func (secJobCreator) StageDone( 125 func (secJobCreator) StageDone(
126 ctx context.Context, 126 ctx context.Context,
127 tx *sql.Tx, 127 tx *sql.Tx,
128 id int64, 128 id int64,
129 ) error { 129 ) error {
132 } 132 }
133 _, err := tx.ExecContext(ctx, secStageDoneSQL, id) 133 _, err := tx.ExecContext(ctx, secStageDoneSQL, id)
134 return err 134 return err
135 } 135 }
136 136
137 // CleanUp of a stretch import is a NOP. 137 // CleanUp of a section import is a NOP.
138 func (*Section) CleanUp() error { return nil } 138 func (*Section) CleanUp() error { return nil }
139 139
140 // Do executes the actual stretch import. 140 // Do executes the actual section import.
141 func (sec *Section) Do( 141 func (sec *Section) Do(
142 ctx context.Context, 142 ctx context.Context,
143 importID int64, 143 importID int64,
144 conn *sql.Conn, 144 conn *sql.Conn,
145 feedback Feedback, 145 feedback Feedback,