Book a Demo

Author Topic: Help modifying DDL macros  (Read 2646 times)

stetou

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Help modifying DDL macros
« on: November 30, 2023, 08:25:35 am »
It's My first step for customising a DDL base template.
I'm trying to modify the format of the column datatype generated by the DDL Column Definition
For now I simply want the datatype to be in UPPERCASE, per example DATETIME2(7) instead  of datetime2(7)

What we got in the template is
Code: [Select]
$remark = "----------------- Datatype -------------------"
%DDLDataType%

I read the doc https://sparxsystems.com/enterprise_architect_user_guide/14.0/model_domains/ddl_template_syntax.html
but I can't figure out how to modifiy the DDLDataType Macro so I can use a string function such as TO_UPPER.

Any tips so I can learn how to do that ?

stetou

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Help modifying DDL macros
« Reply #1 on: December 01, 2023, 05:29:45 am »
My understanding is DDLDateType is not a Macro but a Template
https://sparxsystems.com/enterprise_architect_user_guide/16.0/modeling_domains/ddl_basetemplates.html

Template DDL Data Type : Invoked by the DDL Column Definition template to generate the correctly formatted data type statement for a Table column

Is there a way to Edit this Template DDL Data Type ? Or Extend it somehow ?

stetou

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Help modifying DDL macros
« Reply #2 on: December 01, 2023, 05:47:49 am »
Now that I understand that this is actually a template, I was not looking for the right documentation, we can edit it in the Template editor.

https://sparxsystems.com/enterprise_architect_user_guide/16.1/modeling_domains/edit_ddl_templates.html