On 10-9-2019 10:16, liviuslivius wrote:
Hi
i work a little on https://github.com/FirebirdSQL/firebird/pull/223.
I know this is not top 1 priority for the team, but i need some decisions from the team about formatting
1. Style of the name of xml nodes
"JoinType" like MSSQL
"Join-Type" like Postgress
"Join_Type"
other proposition..

My preference would go to JoinType, but that is largely a personal preference.

2. Plan xml formatting with attributes or without
a) with attributes
<?xml version="1.0" encoding="UTF-8"?>
<SelectExpression xmlns="http://www.firebirdsql.org";>

I'd suggest a more specific namespace, like https://www.firebirdsql.org/2019/ExecutionPlan (eg see https://stackoverflow.com/questions/4623221/good-or-common-naming-conventions-for-xml-namespace-uris ). That avoids ambiguity when we ever introduce other XML that requires a namespace.

     <Node Operation="Union">
         <Node Operation="Nested Loop Join" JoinType="Inner">
             <Node Operation="Full Scan">
                 <Table alias=" &lt; xml &gt;">RDB$DATABASE</Table>
             </Node>
             <Node Operation="Filter">
                 <Table Alias="R" Access="By ID">RDB$RELATIONS</Table>

You example shows two different naming styles for attributes PascalCase (Alias) and camelCase (alias). In my experience (but that might be a result of working in the Java world), using camelCase for attributes is more common.

[..]
</SelectExpression>
b) without attributes at all
<?xml version="1.0" encoding="UTF-8"?>
<SelectExpression xmlns="http://www.firebirdsql.org";>
     <Node>
         <Operation>Union</Operation>
         <Node>
             <Operation>Nested Loop Join</Operation>
             <JoinType>Inner</JoinType>
             <Node>
                 <Operation>Full Scan</Operation>
                 <Alias> &lt; xml &gt;</Alias>
                 <Table>RDB$DATABASE</Table>
             </Node>
[..]
     </Node>
</SelectExpression>

I have a small preference for the variant without attributes, on the other hand the format with attributes is slightly more compact.

Mark
--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to