Showing
8 changed files
with
44 additions
and
1 deletions
No preview for this file type
app/.DS_Store
0 → 100644
No preview for this file type
app/.eslintignore 2
0 → 100644
app/.eslintrc.json
0 → 100644
app/src/components/format.number.ts
0 → 100644
1 | +export const formatNumber = (number : number) : string => { | ||
2 | + if(`${number}`.length > 6) { | ||
3 | + return `${Math.floor(number / 1000000)}m` | ||
4 | + } | ||
5 | + else if(`${number}`.length > 3) { | ||
6 | + return `${Math.floor(number / 1000)}k` | ||
7 | + } else { | ||
8 | + return `${number}`; | ||
9 | + } | ||
10 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
database/__init__.py
0 → 100644
File mode changed
database/connect.py
0 → 100644
1 | +import cx_Oracle | ||
2 | +import os | ||
3 | +from config.key import DATABASE_ID, DATABASE_PW | ||
4 | +from config.URLs import DATABASE_URL | ||
5 | + | ||
6 | +os.putenv('NLS_LANG', '.UTF8') | ||
7 | + | ||
8 | + | ||
9 | +def connectDB(): | ||
10 | + connection = cx_Oracle.connect(DATABASE_ID, DATABASE_PW, DATABASE_URL) | ||
11 | + | ||
12 | + cursor = connection.cursor() | ||
13 | + | ||
14 | + # cursor.execute(""" | ||
15 | + # select name | ||
16 | + # from test_db | ||
17 | + # where text = :texting""", | ||
18 | + # texting="테스트" | ||
19 | + # ) | ||
20 | + | ||
21 | + return cursor | ||
22 | + | ||
23 | + | ||
24 | +def closeDB(cursor): | ||
25 | + cursor.close() | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment