Class ErlSchemaUtils
Inheritance
Inherited Members
Namespace: NFX.Erlang.DataAccess
Assembly: NFX.Erlang.dll
Syntax
public static class ErlSchemaUtils
Methods
ToErlObject(Row, String, String, Boolean)
Convert Row to a hierarchical term that corresponds to the row's schema. The Erlang term is in the form:
{SchemaName::atom(), [{FieldName::atom(), Value}]}.
Declaration
public static IErlObject ToErlObject(this Row row, string targetName = null, string schemaName = null, bool outputDefVals = true)
Parameters
Type | Name | Description |
---|---|---|
Row | row | Row to convert to Erlang object |
System.String | targetName | Target to use to lookup field attributes in the row |
System.String | schemaName | Alternative schema name to use for the outermost name of the schema in the output. |
System.Boolean | outputDefVals | When false no field values are included in output if they are equal to default values |
Returns
Type | Description |
---|---|
IErlObject |
Update(Row, IErlObject, Schema, String, String, Registry<Schema>)
Convert an Erlang hierarchical term representing a schema to a Row.
Declaration
public static void Update(this Row row, IErlObject data, Schema schema = null, string targetName = null, string schemaName = null, Registry<Schema> knownSchemas = null)
Parameters
Type | Name | Description |
---|---|---|
Row | row | Row to update |
IErlObject | data | Data to update row with. The data must be in the form {SchemaName::atom, [{FieldName::atom(), Value}]}. |
Schema | schema | Alternative schema to use in place of row.Schema |
System.String | targetName | Name of the target for looking up field attributes |
System.String | schemaName | Alternative name of the top-most 'SchemaName' atom used in the "data". |
Registry<Schema> | knownSchemas | List of known schemas to use when initializing a field a DynamicRow type. |