MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / createPatternMatcher

Function createPatternMatcher

src/jrd/validation.cpp:594–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592
593
594static SimilarToRegex* createPatternMatcher(thread_db* tdbb, const char* pattern)
595{
596 SimilarToRegex* matcher = NULL;
597 try
598 {
599 if (pattern)
600 {
601 const int len = strlen(pattern);
602
603 //// TODO: Should this be different than trace and replication
604 //// and use case sensitive matcher?
605 matcher = FB_NEW_POOL(*tdbb->getDefaultPool()) SimilarToRegex(
606 *tdbb->getDefaultPool(), 0,
607 pattern, len,
608 "\\", 1);
609 }
610 }
611 catch (const Exception& ex)
612 {
613 Arg::StatusVector status(ex);
614 status << Arg::Gds(isc_random) << Arg::Str(pattern);
615 status.raise();
616 }
617 return matcher;
618}
619
620
621static void explain_pp_bits(const UCHAR bits, Firebird::string& names)

Callers 1

parse_argsMethod · 0.85

Calls 5

SimilarToRegexClass · 0.85
GdsClass · 0.85
StrClass · 0.85
getDefaultPoolMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected