![]() If you do decide to use them, give your anchors really descriptive names - it doesn’t cost any more to use extra characters, and it will help to make your configuration files easier to understand. ![]() While sometimes you want to keep your code ‘DRY’, other times it’s better to be explicit, so use them with care. It’s worth keeping in mind that there’s a tradeoff to using anchors. In this tutorial we saw examples where a YAML anchor was a string and a list, but anchors can represent any of the YAML constructs. Using anchors and aliases can help make your YAML files easier to maintain by adhering to the programming priciple ‘DRY’. If you want to see the equivalent of this, you can scroll up to the earlier code under the heading ‘Repeating YAML Sections’. If the securefilepriv system variable is set to a nonempty directory name, the file to be. ![]() Version: 2 models: - name: model_one columns: - name: id tests: &unique_not_null - unique - not_null - name: col_a - name: col_b - name: model_two columns: - name: id tests: *unique_not_null - name: col_c - name: col_d REPEAT(), Repeat a string the specified number of times. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |