Name

printf — Defines a printf style generator.

Synopsis

<printf [format="format"]>
	... other generators here ...
</printf>
				

Description

This element defines a printf style generator. Generates random character strings according to the printf-style format specifier. The format syntax is similar to the C-language function printf (see man 2 printf).

Attributes

format

The format specifier.

Content

generators

Specify any needeed generators that will supply the data to the format specifiers.

Example

Example 26. Printf generator.

<project name="postgresqlTest">
	<metadata>
		<table name="table0">
			<generator row-count="10000" />
			...
			<column name="some_string" data-type="STRING" size="10">
				<generator>
					<printf format="%d-%s">
						<integer min="1" max="4" />
						<string length="4" />
					</printf>
				</generator>
			</column>
			...
		</table>
		...
	</metadata>
	...
</project>