# HG changeset patch # User j.forth # Date 1247763622 -3600 # Node ID 2519652145c3df305428ad65f0a9660882c68ad3 # Parent d1e5bbcc5ea44d1e98e92fcccf5317fafa034994 Add function assigning a list of composition identifiers to a dataset. Ignore-this: aa2078c1427801491a54d23ffca7da70 darcs-hash:20090716170022-16a00-d95599a9631d18530c0d0d51ef095133f9bbde5a.gz diff -r d1e5bbcc5ea4 -r 2519652145c3 base/database/datasets-functions.lisp --- a/base/database/datasets-functions.lisp Thu Jul 16 16:44:06 2009 +0100 +++ b/base/database/datasets-functions.lisp Thu Jul 16 18:00:22 2009 +0100 @@ -54,6 +54,16 @@ composition-identifier))) :database database) +(defun assign-compositions-to-dataset (composition-identifiers + dataset-identifier + &optional (database + *amuse-database*)) + "This should be done more sensibly." + (loop for identifier in composition-identifiers + do (assign-composition-to-dataset identifier + dataset-identifier + database))) + (defun get-dataset (dataset-identifier &optional (database *amuse-database*)) (let ((dataset-header (clsql:query (format nil " diff -r d1e5bbcc5ea4 -r 2519652145c3 base/database/implementations-setup.lisp --- a/base/database/implementations-setup.lisp Thu Jul 16 16:44:06 2009 +0100 +++ b/base/database/implementations-setup.lisp Thu Jul 16 18:00:22 2009 +0100 @@ -42,6 +42,7 @@ CREATE FUNCTION get_impl_id ( impl_name VARCHAR(255)) RETURNS SMALLINT +READS SQL DATA RETURN (SELECT implementation_id FROM amuse_implementations WHERE implementation_name = impl_name);" @@ -57,6 +58,7 @@ CREATE FUNCTION get_impl_name ( impl_id SMALLINT) RETURNS VARCHAR(255) +READS SQL DATA RETURN (SELECT implementation_name FROM amuse_implementations WHERE implementation_id = impl_id);"