annotate base/datasets/datasets-db/constructors.lisp @ 259:c4e9a7bb9897

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