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