
(defvar computed-functions)

(provide (quote db-convert))

(defun creation-method-literal-p (creation-method) (byte-code ":…	 @Á=‡" [creation-method literal] 2))

(proclaim-inline creation-method-literal-p)

(defun db-convert (database fieldnames-creation) "\
Convert DATABASE's field structure according to FIELDNAMES-CREATION.
This function rearranges the field order, converts fields from one type to
another, adds or removes fields, and so forth.

FIELDNAMES-CREATION is a list of two-element lists of (fieldnames
creation-method); if creation-method would be nil, then fieldname alone
may be used in place of the two-element list." (byte-code "ÊËÌ	\"
\"	G
ÍHÎÈ…D …D ÏÐÑH#\"ˆÍHT‰ˆ=…@ É‰ˆ‚ ˆÉ,ˆÒ
ËÓK	\"\"*‡" [cmethods fieldnames-creation database no-of-new-fields first-link maplinks-link maplinks-index maplinks-not-done t nil db-canonicalize-creation-methods mapcar (lambda (fieldname-creation) (byte-code "9ƒ	 Á‚ A@‡" [fieldname-creation ""] 1)) 2 1 link-set-record db-convert-record 6 db-set-fieldname-vars car] 10))

(defun db-convert-record (record creation-methods &optional no-of-fields) (byte-code "Ç	† 
GÃ\"ÈÃ
…' É
@\"Iˆ
AT‰ˆ‚ ˆ+‡" [new-record no-of-fields creation-methods nil this-field-no computed-functions record make-vector 0 db-convert-compute-field-value] 7))

(defun db-convert-compute-field-value (creation-method old-record) (byte-code "É!ƒ 	H‚f Ê!ƒ A@‚f :ƒb @A@…, Ë
\"ƒ8 A8‚^ ÌÍ
A\"Î
@\"ƒ[ 
BB‰ˆ8‚] *+‚f ÏÐ\"‡" [creation-method old-record function-spec result-no result-found computed-functions args result t numberp creation-method-literal-p assoc mapcar (lambda (arg-spec) (byte-code "Ã!ƒ 	H‚ Ä!ƒ A@‚ ÅÆ\"‡" [arg-spec old-record t numberp creation-method-literal-p error "Bad argument specification %s."] 5)) apply error "Unknown creation method %s"] 8))

(defun db-canonicalize-creation-methods (creation-methods database) (byte-code "ÁÂ\"‡" [creation-methods mapcar (lambda (creation-method) (byte-code "Â	\"‡" [creation-method database db-canonicalize-creation-method] 3))] 3))

(defun db-canonicalize-creation-method (creation-method database) (byte-code "?ƒ	 È‚¥ ;ƒ ÉD‚¥ Ê!ƒ ‚¥ 9ƒ4 Ë	\"†1 ÌÍ	ÎH#‚¥ Ï!ƒV ÐV…E 	ÑHWƒL ‚S ÌÒ	ÎH#‚¥ :?ƒc ÌÓ\"‚¥ @ÇÇÇ:ƒ� @AA@‰‚Š AÇ‰ˆÔ!?…– ÌÕ\"ˆÖ×\"‰ˆBB,‡" [creation-method database t function-spec function args result-no nil (literal "") literal creation-method-literal-p fieldname->fieldnumber error "%s isn't a fieldname in database %s." 1 numberp 0 10 "%d isn't a valid field number in database %s." "Ill-formed creation method %s." fboundp "%s has no function definition." mapcar (lambda (name-or-number) (byte-code "Â!ƒ
 ‚ 	ˆ‡" [name-or-number fieldname->fieldnumber numberp] 2))] 11))
