row and table gateway examples