Skip to content
Advertisement

Tag: heredoc

How to make generic SQL heredocs?

I’m making a mock ORM in Ruby, storing ‘forum’ data. I have the following tables: users (id, fname, lname), and questions (id, title, body, author_id). a_user.create and a_question.create are more or less the same: I’m writing another class, ModelBase, and I’d like to be able to say something like or . Users and Questions do not have an id until

Advertisement