Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Postgresql For Doctrine Laravel Package

martin-georgiev/postgresql-for-doctrine

Adds PostgreSQL-specific power to Doctrine DBAL/ORM: rich native types (jsonb, arrays, ranges, network, geometric, etc.) plus DQL functions/operators for JSON and array querying. Supports PostgreSQL 9.4+ and PHP 8.2+.

View on GitHub
Deep Wiki
Context7

XML Functions

📖 See also: Available Types for the xml and xml[] DBAL types

PostgreSQL function Register for DQL as Implemented by
xml_is_well_formed XML_IS_WELL_FORMED MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlIsWellFormed
xml_is_well_formed_content XML_IS_WELL_FORMED_CONTENT MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlIsWellFormedContent
xml_is_well_formed_document XML_IS_WELL_FORMED_DOCUMENT MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlIsWellFormedDocument
xmlagg XMLAGG MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlAgg
xmlcomment XMLCOMMENT MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlComment
xmlconcat XMLCONCAT MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlConcat
xmlexists XMLEXISTS MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlExists
xmlpi XMLPI MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlPi
xmltext XMLTEXT MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XmlText
xpath XPATH MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Xpath
xpath_exists XPATH_EXISTS MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\XpathExists

Usage Examples

-- ORDER BY inside the aggregate — not obvious in Doctrine DQL
SELECT e.category, XMLAGG(e.xmlData ORDER BY e.createdAt) FROM App\Entity\Article e GROUP BY e.category

-- xml_is_well_formed uses the session xmloption (DOCUMENT or CONTENT mode)
-- xml_is_well_formed_document always requires a single root element
-- xml_is_well_formed_content accepts fragments and plain text nodes
SELECT XML_IS_WELL_FORMED(e.xmlData) FROM App\Entity\Article e
SELECT XML_IS_WELL_FORMED_DOCUMENT(e.xmlData) FROM App\Entity\Article e
SELECT XML_IS_WELL_FORMED_CONTENT(e.xmlData) FROM App\Entity\Article e

-- XPath text() node extraction and attribute predicates
SELECT XPATH('//item/title/text()', e.xmlData) FROM App\Entity\Article e WHERE e.id = :id
SELECT XPATH_EXISTS('//item[[@active](https://github.com/active)="true"]', e.xmlData) FROM App\Entity\Article e WHERE e.id = :id

-- XPath existence test (boolean) and XML processing instruction
SELECT XMLEXISTS('//item', e.xmlData) FROM App\Entity\Article e WHERE e.id = :id
SELECT XMLPI('php', 'echo "hello";') FROM App\Entity\Article e WHERE e.id = :id
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin