Initial hackish SQL support