| 415 | } |
| 416 | |
| 417 | static bool evaluate(MemoryPool& pool, TextType* ttype, const UCHAR* s, SLONG sl, |
| 418 | const UCHAR* p, SLONG pl, const UCHAR* escape, SLONG escape_length, |
| 419 | const UCHAR* sql_match_any, SLONG match_any_length, |
| 420 | const UCHAR* sql_match_one, SLONG match_one_length) |
| 421 | { |
| 422 | StrConverter cvt1(pool, ttype, p, pl), |
| 423 | cvt2(pool, ttype, s, sl), |
| 424 | cvt_escape(pool, ttype, escape, escape_length), |
| 425 | cvt_match_any(pool, ttype, sql_match_any, match_any_length), |
| 426 | cvt_match_one(pool, ttype, sql_match_one, match_one_length); |
| 427 | |
| 428 | fb_assert(pl % sizeof(CharType) == 0); |
| 429 | fb_assert(sl % sizeof(CharType) == 0); |
| 430 | Firebird::LikeEvaluator<CharType> evaluator(pool, |
| 431 | reinterpret_cast<const CharType*>(p), pl / sizeof(CharType), |
| 432 | (escape ? *reinterpret_cast<const CharType*>(escape) : 0), escape_length != 0, |
| 433 | *reinterpret_cast<const CharType*>(sql_match_any), |
| 434 | *reinterpret_cast<const CharType*>(sql_match_one)); |
| 435 | evaluator.processNextChunk(reinterpret_cast<const CharType*>(s), sl / sizeof(CharType)); |
| 436 | return evaluator.getResult(); |
| 437 | } |
| 438 | |
| 439 | private: |
| 440 | Firebird::LikeEvaluator<CharType> evaluator; |
nothing calls this directly
no test coverage detected