Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

spring-projects-issues opened this issue Jan 24, 2020 · 0 comments
in: core type: task


Copy link

@spring-projects-issues spring-projects-issues commented Jan 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core type: task
None yet

No branches or pull requests

2 participants