Added __callStatic to database capsule

See issue #2091