Insert data into a database
The database before insert
 
 Frame> printP
     0 "John Doe" 0
     1 "Jane Doe" 0
     2 "Steve Black" 1
 
 insertJack = 
     withDB $ \ db -> 
     insert db P.farmers ((P.farmer_id << constant 3) # 
                          (P.name << constant "Jack Farmer")# 
                          (P.farm_id << constant 2)) 
 
 Frame> insertJack
The database after insert
 
 Frame> printP
     0 "John Doe" 0
     1 "Jane Doe" 0
     2 "Steve Black" 1
     3 "Jack Farmer" 2
if you get an error see
this page
also see delete
what's that P?
Here are all words and functions with references, in alphabetical order
Go to main page