comparison base/datasets/datasets-db/constructors.lisp @ 251:6a3adca16910

Refactor dataset stuff out of amuse-database-admin, and add midifile-dataset.
author Jamie Forth <j.forth@gold.ac.uk>
date Thu, 24 Feb 2011 11:23:18 +0000
parents
children
comparison
equal deleted inserted replaced
250:b3260d1d2419 251:6a3adca16910
1 (cl:in-package #:amuse-datasets)
2
3 (defun make-db-dataset-identifier (dataset-id)
4 (make-instance 'db-dataset-identifier
5 :dataset-id dataset-id))
6
7 (defun make-new-dataset-record (description &optional
8 (database
9 amuse-database-admin:*amuse-database*))
10 "A dataset is a set of pieces used for a particualar analytical
11 task. A dataset is not necessarily the same thing as a corpus or
12 collection (are these things different?). Corpus indicates that a set
13 of pieces have been curated in some way and in that sense `belong
14 together'. A dataset is just simply a set of pieces gathered together
15 to analyse, and the pieces can be from any corpus or backend."
16 (let (dataset-id)
17 #.(clsql:locally-enable-sql-reader-syntax)
18 (clsql:insert-records :into "amuse_datasets"
19 :attributes '([description])
20 :values (list description)
21 :database database)
22 #.(clsql:locally-disable-sql-reader-syntax)
23 (setf dataset-id (clsql-mysql::mysql-insert-id
24 (clsql-mysql::database-mysql-ptr
25 database)))
26 (make-db-dataset-identifier dataset-id)))