mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
allow map-only named statement constructions in YAML
This commit is contained in:
parent
a4b7a8da34
commit
fff55212da
@ -59,7 +59,13 @@ public class RawStmtDef extends RawStmtFields {
|
||||
" docs for undefined-name-statement-tuple");
|
||||
}
|
||||
Map.Entry<String, Object> firstEntry = iterator.next();
|
||||
setStmt((String) firstEntry.getValue());
|
||||
if (firstEntry.getValue() instanceof Map && map.size()==1) {
|
||||
Map values = (Map) firstEntry.getValue();
|
||||
setFieldsByReflection(values);
|
||||
map = values;
|
||||
} else if (firstEntry.getValue() instanceof CharSequence){
|
||||
setStmt(((CharSequence) firstEntry.getValue()).toString());
|
||||
}
|
||||
map.remove(firstEntry.getKey());
|
||||
if (getName().isEmpty()) {
|
||||
setName(firstEntry.getKey());
|
||||
|
Loading…
Reference in New Issue
Block a user