132 returning resource_id, lastmodified, creationdate;"; |
132 returning resource_id, lastmodified, creationdate;"; |
133 |
133 |
134 // Update resource metadata |
134 // Update resource metadata |
135 // params: $1: resource_id |
135 // params: $1: resource_id |
136 // $2: contentlength |
136 // $2: contentlength |
137 static const char *sql_update_resource = "update Resource set contentlength = $2, lastmodified = now() where resource_id = $1;"; |
137 static const char *sql_update_resource = "update Resource set contentlength = $2, lastmodified = now(), etag = gen_random_uuid() where resource_id = $1;"; |
138 |
138 |
139 // Delete a resource |
139 // Delete a resource |
140 // params: $1: resource_id |
140 // params: $1: resource_id |
141 static const char *sql_delete_res = "delete from Resource where parent_id is not null and resource_id = $1;"; |
141 static const char *sql_delete_res = "delete from Resource where parent_id is not null and resource_id = $1;"; |
142 |
142 |