Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
7127 Widoki

I found this line inside __compute, mapping{ in account.py

'debit': "COALESCE(SUM(l.debit), 0) as debit",

but I don't understand what is l.debit or l.credit also the parent_right parent_left mechanics

Awatar
Odrzuć
Autor

Thx thats good information

Najlepsza odpowiedź

Debit and Credit are basic accounting concepts, used in the double-entry bookkeeping system.

COALESCE is this case works like Oracle's NVL and SQLServer's IsNull: COALESCE(a, b) returns a if a is not null, and returns b if a is null.

It safely defaults to a zero value if no data is found.

Awatar
Odrzuć
Autor

well I already knew all of that. What im asking is how the mapping to l.debit or other l. variables works, and how the parent_right and parent_left are generated and what is their role in the calculation.

Powiązane posty Odpowiedzi Widoki Czynność
1
mar 15
4251
2
lis 16
5494