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

Function par_collate

src/gpre/sqe.cpp:1978–2007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1976//
1977
1978static gpre_nod* par_collate( gpre_req* request, gpre_nod* arg)
1979{
1980 assert_IS_REQ(request);
1981 assert_IS_NOD(arg);
1982
1983 gpre_nod* node = MSC_node(nod_cast, 2);
1984 node->nod_count = 1;
1985 node->nod_arg[0] = arg;
1986 gpre_fld* field = (gpre_fld*) MSC_alloc(FLD_LEN);
1987 node->nod_arg[1] = (gpre_nod*) field;
1988 CME_get_dtype(arg, field);
1989 if (field->fld_dtype > dtype_any_text)
1990 {
1991 // cast expression to VARYING with implementation-defined
1992 // maximum length
1993
1994 field->fld_dtype = dtype_varying;
1995 field->fld_char_length = 30;
1996 field->fld_length = 0; // calculated by SQL_adjust_field_dtype
1997 field->fld_scale = 0;
1998 field->fld_sub_type = 0;
1999 }
2000 else if (field->fld_sub_type) {
2001 field->fld_character_set = MET_get_text_subtype(field->fld_sub_type);
2002 }
2003 SQL_par_field_collate(request, field);
2004 SQL_adjust_field_dtype(field);
2005
2006 return node;
2007}
2008
2009
2010//____________________________________________________________

Callers 3

par_multiplyFunction · 0.85
par_orderFunction · 0.85

Calls 6

MSC_nodeFunction · 0.85
MSC_allocFunction · 0.85
CME_get_dtypeFunction · 0.85
MET_get_text_subtypeFunction · 0.85
SQL_par_field_collateFunction · 0.85
SQL_adjust_field_dtypeFunction · 0.85

Tested by

no test coverage detected