Whatever side they are going in from, i.e. either a gastroscopy (going in via the mouth, looking at your oesophagus, stomach and duodenum) or colonoscopy (going in via the anus, looking at the colon) I can say from what I know from Germany that everyone here (unless they explicitly don't want it) gets medicated with a Midazolam injection.
This should give you the sensation of going to sleep and you should have a memory gap of about 1-2 hrs. An alternative is Propofol which is also used in general anaesthetic as hypnotizing medicine. This method is not a general anaesthetic, just a sedation.
Both these medicines wear off pretty quickly, but you must go home with help and not drive for 24hrs, since your reactions might be slow.
I have had both medicines for endoscopy and both work very well, although I found Midazolam wears off faster.