Skip to content

Expose arguments of o.s.d.r.c.sql.SimpleFunction [DATAJDBC-478] #705

@spring-projects-issues

Description

@spring-projects-issues

Mark Paluch opened DATAJDBC-478 and commented

We should expose the arguments of a SimpleFunction to allow introspection. In R2DBC, we take Expression objects and attempt to map these against the entity metamodel to derive the column name from a property.

			SimpleFunction function = (SimpleFunction) expression;
			DirectFieldAccessor accessor = new DirectFieldAccessor(function);

			List<Expression> arguments = (List<Expression>) accessor.getPropertyValue("expressions");
			List<Expression> mappedArguments = new ArrayList<>(arguments.size());

			for (Expression argument : arguments) {
				mappedArguments.add(getMappedObject(argument, entity));
			}

			SimpleFunction mappedFunction = SimpleFunction.create(function.getFunctionName(), mappedArguments);

No further details from DATAJDBC-478

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supporttype: taskA general task

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions