You are correct: categories cannot be equationally axiomatized (their models are of an “essentially algebraic theory”, not an “algebraic” theory). However, CQL does allow one to define such theories, basically by using a fragment of first-order logic that does indeed include pullbacks:
schema cat = literal : empty {
entities
Ob Mor Pair
foreign_keys
id: Ob -> Mor
dom: Mor -> Ob
cod: Mor -> Ob
Fst: Pair -> Mor
Snd: Pair -> Mor
comp: Pair -> Mor
path_equations
Ob.id.dom = Ob
Ob.id.cod = Ob
Pair.Fst.dom = Pair.comp.dom
Pair.Fst.cod = Pair.Snd.dom
Pair.Snd.cod = Pair.comp.cod
options
}
constraints theEDs = literal : cat {
#every composable pair gives a Pair
forall f g:Mor
where f.cod=g.dom ->
exists unique fg:Pair
where fg.Fst=f fg.Snd=g
#left unitality
forall fid:Pair
->
where fid.comp = fid.Fst
#right unitality
forall idf:Pair
->
where idf.comp = idf.Snd
#associativity
forall fg gh fgThenh fThengh: Pair
where
fg.Snd = gh.Fst
fgThenh.Fst = fg.comp
fgThenh.Snd = gh.Snd
fThengh.Fst = fg.Fst
fThengh.Snd = gh.comp
->
where fgThenh.comp = fThengh.comp
}