Giter VIP home page Giter VIP logo

4d-component-get-journal-information's Introduction

4d-component-get-journal-information

Returns the "include in journal" status of each table.

An example of using the new EXPORT STRUCTURE command.

$info:=Get_journal_information 

Example

Source

C_TEXT($structure)
EXPORT STRUCTURE($structure)

$dom:=DOM Parse XML variable($structure)

ARRAY TEXT($tables;0)
$table:=DOM Find XML element($dom;"base/table";$tables)

ARRAY OBJECT($tableInfos;0)
C_OBJECT($tableInfo)

C_LONGINT($id)
C_TEXT($uuid;$name)
C_BOOLEAN($prevent_journaling)

For ($i;0x0001;Size of array($tables))

$table:=$tables{$i}

CLEAR VARIABLE($id)
CLEAR VARIABLE($uuid)
CLEAR VARIABLE($name)
CLEAR VARIABLE($prevent_journaling)

ON ERR CALL("DOM_ERR")  //"prevent_journaling" attribute may not exist
DOM GET XML ATTRIBUTE BY NAME($table;"id";$id)
DOM GET XML ATTRIBUTE BY NAME($table;"uuid";$uuid)
DOM GET XML ATTRIBUTE BY NAME($table;"name";$name)
DOM GET XML ATTRIBUTE BY NAME($table;"prevent_journaling";$prevent_journaling)
ON ERR CALL("")

OB SET($tableInfo;"id";$id)
OB SET($tableInfo;"uuid";$uuid)
OB SET($tableInfo;"name";$name)
OB SET($tableInfo;"prevent_journaling";$prevent_journaling)

APPEND TO ARRAY($tableInfos;$tableInfo)
CLEAR VARIABLE($tableInfo)  //decouple array element
End for 

$journal_file:=DOM Find XML element($dom;"base/base_extra/journal_file")
C_BOOLEAN($journal_file_enabled)
DOM GET XML ATTRIBUTE BY NAME($journal_file;"journal_file_enabled";$journal_file_enabled)

C_OBJECT($journal_info)
OB SET($journal_info;"journal_file_enabled";$journal_file_enabled)
OB SET ARRAY($journal_info;"tables";$tableInfos)

DOM CLOSE XML($dom)

$0:=$journal_info

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.