Mercurial > hg > amuse
view 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 |
line wrap: on
line source
(cl:in-package #:amuse-datasets) (defun make-db-dataset-identifier (dataset-id) (make-instance 'db-dataset-identifier :dataset-id dataset-id)) (defun make-new-dataset-record (description &optional (database amuse-database-admin:*amuse-database*)) "A dataset is a set of pieces used for a particualar analytical task. A dataset is not necessarily the same thing as a corpus or collection (are these things different?). Corpus indicates that a set of pieces have been curated in some way and in that sense `belong together'. A dataset is just simply a set of pieces gathered together to analyse, and the pieces can be from any corpus or backend." (let (dataset-id) #.(clsql:locally-enable-sql-reader-syntax) (clsql:insert-records :into "amuse_datasets" :attributes '([description]) :values (list description) :database database) #.(clsql:locally-disable-sql-reader-syntax) (setf dataset-id (clsql-mysql::mysql-insert-id (clsql-mysql::database-mysql-ptr database))) (make-db-dataset-identifier dataset-id)))