Paste: PERSISTENT:
Author: | erg |
Mode: | factor |
Date: | Tue, 21 Apr 2009 04:14:29 |
Plain Text |
TUPLE: default-person id name birthdate email homepage ;
PERSISTENT: default-person {
{ "id" INTEGER { SERIAL PRIMARY-KEY } }
{ "name" VARCHAR }
{ "birthdate" TIMESTAMP }
{ "email" VARCHAR }
{ "homepage" URL }
}
Author: | erg |
Mode: | factor |
Date: | Tue, 21 Apr 2009 04:15:03 |
Plain Text |
default-person lookup-persistent .
T{ persistent
{ class default-person }
{ name "default_person" }
{ columns
{
T{ db-column
{ accessor id>> }
{ name "id" }
{ type INTEGER }
{ modifiers { SERIAL PRIMARY-KEY } }
}
T{ db-column
{ accessor name>> }
{ name "name" }
{ type VARCHAR }
}
T{ db-column
{ accessor birthdate>> }
{ name "birthdate" }
{ type TIMESTAMP }
}
T{ db-column
{ accessor email>> }
{ name "email" }
{ type VARCHAR }
}
T{ db-column
{ accessor homepage>> }
{ name "homepage" }
{ type URL }
}
}
}
{ column-name-string "name, birthdate, email, homepage" }
{ accessor-quot
[
[ name>> birthdate>> email>> homepage>> ]
output>sequence
]
}
{ db-assigned-id? t }
}
New Annotation