Browse Source

Merge branch 'develop' of https://github.com/nocodb/nocodb into develop

pull/1845/head
Wing-Kam Wong 3 years ago
parent
commit
04629da20b
  1. 8
      packages/nc-gui/components/ProjectTreeView.vue
  2. 1
      packages/nc-gui/components/project/spreadsheet/components/virtualCell.vue
  3. 23
      packages/nc-gui/components/project/spreadsheet/components/virtualCell/formulaCell.vue
  4. 2
      packages/nc-gui/components/settings/settingsModal.vue
  5. 6
      packages/nc-gui/lang/da.json
  6. 6
      packages/nc-gui/lang/de.json
  7. 6
      packages/nc-gui/lang/en.json
  8. 8
      packages/nc-gui/lang/es.json
  9. 6
      packages/nc-gui/lang/fa.json
  10. 6
      packages/nc-gui/lang/fi.json
  11. 6
      packages/nc-gui/lang/fr.json
  12. 6
      packages/nc-gui/lang/hr.json
  13. 6
      packages/nc-gui/lang/id.json
  14. 6
      packages/nc-gui/lang/it_IT.json
  15. 6
      packages/nc-gui/lang/iw.json
  16. 6
      packages/nc-gui/lang/ja.json
  17. 6
      packages/nc-gui/lang/ko.json
  18. 6
      packages/nc-gui/lang/lv.json
  19. 6
      packages/nc-gui/lang/nl.json
  20. 6
      packages/nc-gui/lang/no.json
  21. 6
      packages/nc-gui/lang/pl.json
  22. 6
      packages/nc-gui/lang/pt.json
  23. 6
      packages/nc-gui/lang/pt_BR.json
  24. 6
      packages/nc-gui/lang/ru.json
  25. 6
      packages/nc-gui/lang/sl.json
  26. 6
      packages/nc-gui/lang/sv.json
  27. 6
      packages/nc-gui/lang/th.json
  28. 6
      packages/nc-gui/lang/tr.json
  29. 6
      packages/nc-gui/lang/uk.json
  30. 6
      packages/nc-gui/lang/vi.json
  31. 6
      packages/nc-gui/lang/zh_CN.json
  32. 6
      packages/nc-gui/lang/zh_HK.json
  33. 6
      packages/nc-gui/lang/zh_TW.json
  34. 1
      packages/nc-gui/pages/projects/index.vue
  35. 12
      packages/noco-docs/content/en/setup-and-usages/formulas.md
  36. 17
      packages/nocodb/src/lib/dataMapper/lib/sql/formulav2/formulaQueryBuilderv2.ts
  37. 23
      packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/mssql.ts
  38. 16
      packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/mysql.ts
  39. 29
      packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/pg.ts
  40. 25
      packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/sqlite.ts

8
packages/nc-gui/components/ProjectTreeView.vue

@ -558,7 +558,7 @@
<!-- Team & Auth --> <!-- Team & Auth -->
<v-list-item-title> <v-list-item-title>
<span class="font-weight-regular caption">{{ <span class="font-weight-regular caption">{{
$t("title.team&auth") $t("title.teamAndAuth")
}}</span> }}</span>
</v-list-item-title> </v-list-item-title>
</v-list-item> </v-list-item>
@ -690,7 +690,7 @@
<v-icon color="brown" small class="mr-1"> <v-icon color="brown" small class="mr-1">
mdi-cog mdi-cog
</v-icon> </v-icon>
Team & Settings {{ $t('title.teamAndSettings') }}
</div> </div>
</template> </template>
</settings-modal> </settings-modal>
@ -705,7 +705,7 @@
<v-icon small class="mr-2"> <v-icon small class="mr-2">
mdi-api mdi-api
</v-icon> </v-icon>
API Docs {{ $t('title.apiDocs') }}
</div> </div>
<v-divider /> <v-divider />
<extras class="pl-1" /> <extras class="pl-1" />
@ -1089,7 +1089,7 @@ export default {
this.changeActiveTab(tabIndex); this.changeActiveTab(tabIndex);
} else { } else {
let item = { let item = {
name: `${this.$t("title.team&auth")} `, name: `${this.$t("title.teamAndAuth")} `,
key: `roles`, key: `roles`,
}; };
item._nodes = { env: "_noco" }; item._nodes = { env: "_noco" };

1
packages/nc-gui/components/project/spreadsheet/components/virtualCell.vue

@ -85,6 +85,7 @@
v-else-if="formula" v-else-if="formula"
:row="row" :row="row"
:column="column" :column="column"
:client="nodes.dbConnection.client"
/> />
<rollup-cell <rollup-cell
v-else-if="rollup" v-else-if="rollup"

23
packages/nc-gui/components/project/spreadsheet/components/virtualCell/formulaCell.vue

@ -11,19 +11,27 @@
</v-tooltip> </v-tooltip>
<div v-else-if="urls" v-html="urls" /> <div v-else-if="urls" v-html="urls" />
<div v-else> <div v-else>
{{ row[column.title] }} {{ result }}
</div> </div>
</template> </template>
<script> <script>
import dayjs from 'dayjs'
export default { export default {
name: 'FormulaCell', name: 'FormulaCell',
props: { column: Object, row: Object }, props: { column: Object, row: Object, client: String },
computed: { computed: {
result() {
if (this.client === 'pg') {
return this.handleTZ(this.row[this.column.title])
}
return this.row[this.column.title]
},
urls() { urls() {
if (!this.row[this.column.title]) { return } if (!this.row[this.column.title]) { return }
const rawText = this.row[this.column.title].toString() const rawText = this.result.toString()
let found = false let found = false
const out = rawText.replace(/URI::\((.*?)\)/g, (_, url) => { const out = rawText.replace(/URI::\((.*?)\)/g, (_, url) => {
found = true found = true
@ -36,6 +44,15 @@ export default {
return found && out return found && out
} }
},
methods: {
// handle date returned from PostgreSQL
handleTZ(val) {
if (!val) { return }
return val.replace(/((?:-?(?:[1-9][0-9]*)?[0-9]{4})-(?:1[0-2]|0[1-9])-(?:3[01]|0[1-9]|[12][0-9])T(?:2[0-3]|[01][0-9]):(?:[0-5][0-9]):(?:[0-5][0-9])(?:\.[0-9]+)?(?:Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9]))/g, (i, v) => {
return dayjs(v).format('YYYY-MM-DD HH:mm')
})
}
} }
} }
</script> </script>

2
packages/nc-gui/components/settings/settingsModal.vue

@ -48,7 +48,7 @@
<!-- Team & Auth --> <!-- Team & Auth -->
<v-list-item-title> <v-list-item-title>
<span :class="{'font-weight-medium': activePage === 'roles', 'font-weight-regular':activePage !=='roles'}">{{ <span :class="{'font-weight-medium': activePage === 'roles', 'font-weight-regular':activePage !=='roles'}">{{
$t('title.team&auth') $t('title.teamAndAuth')
}}</span> }}</span>
</v-list-item-title> </v-list-item-title>
</v-list-item> </v-list-item>

6
packages/nc-gui/lang/da.json

@ -151,7 +151,7 @@
"lockedView": "Låst udsigt", "lockedView": "Låst udsigt",
"personalView": "Personlig visning", "personalView": "Personlig visning",
"appStore": "App butik", "appStore": "App butik",
"team&auth": "Team & Auth.", "teamAndAuth": "Team & Auth.",
"rolesUserMgmt": "Roller & Brugere Management", "rolesUserMgmt": "Roller & Brugere Management",
"userMgmt": "Bruger Management", "userMgmt": "Bruger Management",
"apiTokenMgmt": "API TOKENS MANAGEMENT", "apiTokenMgmt": "API TOKENS MANAGEMENT",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Avancerede parametre", "advancedParameters": "SSL & Avancerede parametre",
"headCreateProject": "Opret projekt | Nocodb.", "headCreateProject": "Opret projekt | Nocodb.",
"headLogin": "Log ind | Nocodb.", "headLogin": "Log ind | Nocodb.",
"resetPassword": "Nulstil din adgangskode" "resetPassword": "Nulstil din adgangskode",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Bemærk Via.", "notifyVia": "Bemærk Via.",

6
packages/nc-gui/lang/de.json

@ -151,7 +151,7 @@
"lockedView": "Gesperrte Ansicht", "lockedView": "Gesperrte Ansicht",
"personalView": "Persönliche Ansicht", "personalView": "Persönliche Ansicht",
"appStore": "App-Store", "appStore": "App-Store",
"team&auth": "Team & Auth", "teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Rollen- & Benutzermanagement", "rolesUserMgmt": "Rollen- & Benutzermanagement",
"userMgmt": "Benutzermanagement", "userMgmt": "Benutzermanagement",
"apiTokenMgmt": "API-Tokens-Management", "apiTokenMgmt": "API-Tokens-Management",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Erweiterte Parameter", "advancedParameters": "SSL & Erweiterte Parameter",
"headCreateProject": "Projekt erstellen | NocoDB", "headCreateProject": "Projekt erstellen | NocoDB",
"headLogin": "Anmelden | NocoDB", "headLogin": "Anmelden | NocoDB",
"resetPassword": "Passwort zurücksetzen" "resetPassword": "Passwort zurücksetzen",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Benachrichtigen mit", "notifyVia": "Benachrichtigen mit",

6
packages/nc-gui/lang/en.json

@ -151,7 +151,7 @@
"lockedView": "Locked View", "lockedView": "Locked View",
"personalView": "Personal View", "personalView": "Personal View",
"appStore": "App Store", "appStore": "App Store",
"team&auth": "Team & Auth", "teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Roles & Users Management", "rolesUserMgmt": "Roles & Users Management",
"userMgmt": "Users management", "userMgmt": "Users management",
"apiTokenMgmt": "API Tokens Management", "apiTokenMgmt": "API Tokens Management",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Advanced parameters", "advancedParameters": "SSL & Advanced parameters",
"headCreateProject": "Create Project | NocoDB", "headCreateProject": "Create Project | NocoDB",
"headLogin": "Log In | NocoDB", "headLogin": "Log In | NocoDB",
"resetPassword": "Reset your password" "resetPassword": "Reset your password",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Notify Via", "notifyVia": "Notify Via",

8
packages/nc-gui/lang/es.json

@ -12,7 +12,7 @@
"add": "Agregar", "add": "Agregar",
"edit": "Editar", "edit": "Editar",
"remove": "Eliminar", "remove": "Eliminar",
"save": "Salvar", "save": "Guardar",
"cancel": "Cancelar", "cancel": "Cancelar",
"submit": "Enviar", "submit": "Enviar",
"create": "Crear", "create": "Crear",
@ -151,7 +151,7 @@
"lockedView": "Vista bloqueada", "lockedView": "Vista bloqueada",
"personalView": "Vista personal", "personalView": "Vista personal",
"appStore": "Tienda de aplicaciones", "appStore": "Tienda de aplicaciones",
"team&auth": "Equipo y autenticación", "teamAndAuth": "Equipo y autenticación",
"rolesUserMgmt": "Roles y gestión de usuarios", "rolesUserMgmt": "Roles y gestión de usuarios",
"userMgmt": "Administrar usuarios", "userMgmt": "Administrar usuarios",
"apiTokenMgmt": "Administrar tokens del API", "apiTokenMgmt": "Administrar tokens del API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL y parámetros avanzados", "advancedParameters": "SSL y parámetros avanzados",
"headCreateProject": "Crear proyecto | NocoDB", "headCreateProject": "Crear proyecto | NocoDB",
"headLogin": "Acceder | NocoDB", "headLogin": "Acceder | NocoDB",
"resetPassword": "Cambiar contraseña" "resetPassword": "Cambiar contraseña",
"teamAndSettings": "Equipo y configuración",
"apiDocs": "Documentación de la API"
}, },
"labels": { "labels": {
"notifyVia": "Notificar a través de", "notifyVia": "Notificar a través de",

6
packages/nc-gui/lang/fa.json

@ -151,7 +151,7 @@
"lockedView": "نمایش قفلشده", "lockedView": "نمایش قفلشده",
"personalView": "نمایش شخصی", "personalView": "نمایش شخصی",
"appStore": "اپلیکیشنها", "appStore": "اپلیکیشنها",
"team&auth": "تیم و نویسندگان", "teamAndAuth": "تیم و نویسندگان",
"rolesUserMgmt": "مدیریت نقشها و کاربران", "rolesUserMgmt": "مدیریت نقشها و کاربران",
"userMgmt": "مدیریت کاربران", "userMgmt": "مدیریت کاربران",
"apiTokenMgmt": "مدیریت توکنهای API", "apiTokenMgmt": "مدیریت توکنهای API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL و پارامترهای پیشرفته", "advancedParameters": "SSL و پارامترهای پیشرفته",
"headCreateProject": "ایجاد پروژه | NocoDB", "headCreateProject": "ایجاد پروژه | NocoDB",
"headLogin": "ورود | NocoDB", "headLogin": "ورود | NocoDB",
"resetPassword": "بازنشانی کلمه عبور شما" "resetPassword": "بازنشانی کلمه عبور شما",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "اعلان از طریق", "notifyVia": "اعلان از طریق",

6
packages/nc-gui/lang/fi.json

@ -151,7 +151,7 @@
"lockedView": "Lukittu näkymä", "lockedView": "Lukittu näkymä",
"personalView": "Henkilökohtainen näkymä", "personalView": "Henkilökohtainen näkymä",
"appStore": "Sovelluskauppa", "appStore": "Sovelluskauppa",
"team&auth": "Team & Auth", "teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Roolit ja käyttäjien hallinta", "rolesUserMgmt": "Roolit ja käyttäjien hallinta",
"userMgmt": "Käyttäjien hallinta", "userMgmt": "Käyttäjien hallinta",
"apiTokenMgmt": "API Tokensin hallinta", "apiTokenMgmt": "API Tokensin hallinta",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Advanced Parameters", "advancedParameters": "SSL & Advanced Parameters",
"headCreateProject": "Luo projekti Nokodb", "headCreateProject": "Luo projekti Nokodb",
"headLogin": "Kirjaudu sisään | Nokodb", "headLogin": "Kirjaudu sisään | Nokodb",
"resetPassword": "Nollaa salasana" "resetPassword": "Nollaa salasana",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Ilmoittaa kautta", "notifyVia": "Ilmoittaa kautta",

6
packages/nc-gui/lang/fr.json

@ -151,7 +151,7 @@
"lockedView": "Vue verrouillée", "lockedView": "Vue verrouillée",
"personalView": "Vue personnelle", "personalView": "Vue personnelle",
"appStore": "Magasin d'applications", "appStore": "Magasin d'applications",
"team&auth": "Équipe & Authentification", "teamAndAuth": "Équipe & Authentification",
"rolesUserMgmt": "Rôles & Gestion utilisateurs", "rolesUserMgmt": "Rôles & Gestion utilisateurs",
"userMgmt": "Gestion des utilisateurs", "userMgmt": "Gestion des utilisateurs",
"apiTokenMgmt": "Gestion des jetons API", "apiTokenMgmt": "Gestion des jetons API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL et paramètres avancés", "advancedParameters": "SSL et paramètres avancés",
"headCreateProject": "Créer un projet | Nocodb", "headCreateProject": "Créer un projet | Nocodb",
"headLogin": "Connexion | Nocodb", "headLogin": "Connexion | Nocodb",
"resetPassword": "Réinitialiser le mot de passe" "resetPassword": "Réinitialiser le mot de passe",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Notifier via", "notifyVia": "Notifier via",

6
packages/nc-gui/lang/hr.json

@ -151,7 +151,7 @@
"lockedView": "Zaključan", "lockedView": "Zaključan",
"personalView": "Osobni pogled", "personalView": "Osobni pogled",
"appStore": "Trgovina aplikacijama", "appStore": "Trgovina aplikacijama",
"team&auth": "Tima", "teamAndAuth": "Tima",
"rolesUserMgmt": "Upravce i korisnici", "rolesUserMgmt": "Upravce i korisnici",
"userMgmt": "Upravljanje korisnicima", "userMgmt": "Upravljanje korisnicima",
"apiTokenMgmt": "Upravljanje API tokena", "apiTokenMgmt": "Upravljanje API tokena",
@ -169,7 +169,9 @@
"advancedParameters": "SSL i napredni parametri", "advancedParameters": "SSL i napredni parametri",
"headCreateProject": "Stvoriti projekt | Nocodb", "headCreateProject": "Stvoriti projekt | Nocodb",
"headLogin": "Prijavite se | Nocodb", "headLogin": "Prijavite se | Nocodb",
"resetPassword": "Vraćanje izvorne lozinke" "resetPassword": "Vraćanje izvorne lozinke",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Obavijestiti putem", "notifyVia": "Obavijestiti putem",

6
packages/nc-gui/lang/id.json

@ -151,7 +151,7 @@
"lockedView": "Tampilan yang terkunci", "lockedView": "Tampilan yang terkunci",
"personalView": "Tampilan pribadi", "personalView": "Tampilan pribadi",
"appStore": "Toko aplikasi", "appStore": "Toko aplikasi",
"team&auth": "Tim & AUTH.", "teamAndAuth": "Tim & AUTH.",
"rolesUserMgmt": "Manajemen Peran & Pengguna", "rolesUserMgmt": "Manajemen Peran & Pengguna",
"userMgmt": "Manajemen Pengguna", "userMgmt": "Manajemen Pengguna",
"apiTokenMgmt": "API Token Management.", "apiTokenMgmt": "API Token Management.",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Parameter Lanjutan", "advancedParameters": "SSL & Parameter Lanjutan",
"headCreateProject": "Buat Proyek | Nocodb.", "headCreateProject": "Buat Proyek | Nocodb.",
"headLogin": "Masuk | Nocodb.", "headLogin": "Masuk | Nocodb.",
"resetPassword": "Mereset password Anda" "resetPassword": "Mereset password Anda",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Beri tahu VIA.", "notifyVia": "Beri tahu VIA.",

6
packages/nc-gui/lang/it_IT.json

@ -151,7 +151,7 @@
"lockedView": "Vista chiusa", "lockedView": "Vista chiusa",
"personalView": "Vista personale", "personalView": "Vista personale",
"appStore": "App Store", "appStore": "App Store",
"team&auth": "Team & Autorizzazioni", "teamAndAuth": "Team & Autorizzazioni",
"rolesUserMgmt": "Gestione dei ruoli e degli utenti", "rolesUserMgmt": "Gestione dei ruoli e degli utenti",
"userMgmt": "Gestione degli utenti", "userMgmt": "Gestione degli utenti",
"apiTokenMgmt": "Gestione dei token API", "apiTokenMgmt": "Gestione dei token API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL e parametri avanzati", "advancedParameters": "SSL e parametri avanzati",
"headCreateProject": "Crea progetto | NocoDB", "headCreateProject": "Crea progetto | NocoDB",
"headLogin": "Accedi | NocoDB", "headLogin": "Accedi | NocoDB",
"resetPassword": "Reimposta la tua password" "resetPassword": "Reimposta la tua password",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Notifica via.", "notifyVia": "Notifica via.",

6
packages/nc-gui/lang/iw.json

@ -151,7 +151,7 @@
"lockedView": "נוף נעול", "lockedView": "נוף נעול",
"personalView": "תצוגה אישית", "personalView": "תצוגה אישית",
"appStore": "חנות אפליקציות", "appStore": "חנות אפליקציות",
"team&auth": "צוות & auth.", "teamAndAuth": "צוות & auth.",
"rolesUserMgmt": "תפקידים & ניהול משתמשים", "rolesUserMgmt": "תפקידים & ניהול משתמשים",
"userMgmt": "ניהול משתמשים.", "userMgmt": "ניהול משתמשים.",
"apiTokenMgmt": "ניהול אסינס API.", "apiTokenMgmt": "ניהול אסינס API.",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & פרמטרים מתקדמים", "advancedParameters": "SSL & פרמטרים מתקדמים",
"headCreateProject": "יצירת פרויקט נוקודב", "headCreateProject": "יצירת פרויקט נוקודב",
"headLogin": "התחבר | נוקודב", "headLogin": "התחבר | נוקודב",
"resetPassword": "לאפס את הסיסמה שלך" "resetPassword": "לאפס את הסיסמה שלך",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "להודיע דרך", "notifyVia": "להודיע דרך",

6
packages/nc-gui/lang/ja.json

@ -151,7 +151,7 @@
"lockedView": "ロックビュー", "lockedView": "ロックビュー",
"personalView": "パーソナルビュー", "personalView": "パーソナルビュー",
"appStore": "アプリストア", "appStore": "アプリストア",
"team&auth": "チームと認可", "teamAndAuth": "チームと認可",
"rolesUserMgmt": "ロールとユーザー管理", "rolesUserMgmt": "ロールとユーザー管理",
"userMgmt": "ユーザー管理", "userMgmt": "ユーザー管理",
"apiTokenMgmt": "APIトークン管理", "apiTokenMgmt": "APIトークン管理",
@ -169,7 +169,9 @@
"advancedParameters": "SSL&高度なパラメータ", "advancedParameters": "SSL&高度なパラメータ",
"headCreateProject": "プロジェクトを作成 | NocoDB", "headCreateProject": "プロジェクトを作成 | NocoDB",
"headLogin": "ログイン | NocoDB", "headLogin": "ログイン | NocoDB",
"resetPassword": "パスワードをリセットする" "resetPassword": "パスワードをリセットする",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "次で通知する", "notifyVia": "次で通知する",

6
packages/nc-gui/lang/ko.json

@ -151,7 +151,7 @@
"lockedView": "잠긴보기", "lockedView": "잠긴보기",
"personalView": "개인적인 견해", "personalView": "개인적인 견해",
"appStore": "앱 스토어", "appStore": "앱 스토어",
"team&auth": "팀 및 인증", "teamAndAuth": "팀 및 인증",
"rolesUserMgmt": "역할 및 사용자 관리", "rolesUserMgmt": "역할 및 사용자 관리",
"userMgmt": "사용자 관리", "userMgmt": "사용자 관리",
"apiTokenMgmt": "API 토큰 관리", "apiTokenMgmt": "API 토큰 관리",
@ -169,7 +169,9 @@
"advancedParameters": "SSL 및 고급 매개 변수", "advancedParameters": "SSL 및 고급 매개 변수",
"headCreateProject": "프로젝트 만들기 | nocodb.", "headCreateProject": "프로젝트 만들기 | nocodb.",
"headLogin": "로그인 | NocoDB.", "headLogin": "로그인 | NocoDB.",
"resetPassword": "비밀번호를 재설정" "resetPassword": "비밀번호를 재설정",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "통지를 통지합니다", "notifyVia": "통지를 통지합니다",

6
packages/nc-gui/lang/lv.json

@ -151,7 +151,7 @@
"lockedView": "Bloķētais skats", "lockedView": "Bloķētais skats",
"personalView": "Personīgais skats", "personalView": "Personīgais skats",
"appStore": "Veikals", "appStore": "Veikals",
"team&auth": "Komanda & Autentifikācija", "teamAndAuth": "Komanda & Autentifikācija",
"rolesUserMgmt": "Lomas & Lietotāju pārvaldība", "rolesUserMgmt": "Lomas & Lietotāju pārvaldība",
"userMgmt": "Lietotāju pārvaldība", "userMgmt": "Lietotāju pārvaldība",
"apiTokenMgmt": "API Atslēgu pārvaldība", "apiTokenMgmt": "API Atslēgu pārvaldība",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Paplašinātie parametri", "advancedParameters": "SSL & Paplašinātie parametri",
"headCreateProject": "Izveidot projektu | NocoDB", "headCreateProject": "Izveidot projektu | NocoDB",
"headLogin": "Pieslēgties | NocoDB", "headLogin": "Pieslēgties | NocoDB",
"resetPassword": "Atjaunot paroli" "resetPassword": "Atjaunot paroli",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Paziņot izmantojot", "notifyVia": "Paziņot izmantojot",

6
packages/nc-gui/lang/nl.json

@ -151,7 +151,7 @@
"lockedView": "Vergrendelde weergave", "lockedView": "Vergrendelde weergave",
"personalView": "Persoonlijke weergave", "personalView": "Persoonlijke weergave",
"appStore": "App Store", "appStore": "App Store",
"team&auth": "Team & Auth", "teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Rollen & Gebruikersbeheer", "rolesUserMgmt": "Rollen & Gebruikersbeheer",
"userMgmt": "Gebruikersbeheer", "userMgmt": "Gebruikersbeheer",
"apiTokenMgmt": "API Tokenbeheer", "apiTokenMgmt": "API Tokenbeheer",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Geavanceerde Parameters", "advancedParameters": "SSL & Geavanceerde Parameters",
"headCreateProject": "Project maken | Nocodb", "headCreateProject": "Project maken | Nocodb",
"headLogin": "Log in | Nocodb", "headLogin": "Log in | Nocodb",
"resetPassword": "Stel je wachtwoord opnieuw in" "resetPassword": "Stel je wachtwoord opnieuw in",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Melding via", "notifyVia": "Melding via",

6
packages/nc-gui/lang/no.json

@ -151,7 +151,7 @@
"lockedView": "Låst visning", "lockedView": "Låst visning",
"personalView": "Personlig utsikt", "personalView": "Personlig utsikt",
"appStore": "App Store", "appStore": "App Store",
"team&auth": "Team og Auth.", "teamAndAuth": "Team og Auth.",
"rolesUserMgmt": "Roller og brukeradministrasjon", "rolesUserMgmt": "Roller og brukeradministrasjon",
"userMgmt": "Brukeradministrasjon", "userMgmt": "Brukeradministrasjon",
"apiTokenMgmt": "Administrering av API-nøkler", "apiTokenMgmt": "Administrering av API-nøkler",
@ -169,7 +169,9 @@
"advancedParameters": "SSL og avanserte parametere", "advancedParameters": "SSL og avanserte parametere",
"headCreateProject": "Opprett prosjektet | NocoDB", "headCreateProject": "Opprett prosjektet | NocoDB",
"headLogin": "Logg inn | NocoDB.", "headLogin": "Logg inn | NocoDB.",
"resetPassword": "Tilbakestill passordet ditt" "resetPassword": "Tilbakestill passordet ditt",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Varsle Via.", "notifyVia": "Varsle Via.",

6
packages/nc-gui/lang/pl.json

@ -151,7 +151,7 @@
"lockedView": "Zamknięty widok", "lockedView": "Zamknięty widok",
"personalView": "Widok osobisty", "personalView": "Widok osobisty",
"appStore": "Sklep z aplikacjami", "appStore": "Sklep z aplikacjami",
"team&auth": "Team & Auth.", "teamAndAuth": "Team & Auth.",
"rolesUserMgmt": "Role i zarządzanie użytkownikami", "rolesUserMgmt": "Role i zarządzanie użytkownikami",
"userMgmt": "Zarządzanie użytkownikami", "userMgmt": "Zarządzanie użytkownikami",
"apiTokenMgmt": "Zarządzanie Tokeny API.", "apiTokenMgmt": "Zarządzanie Tokeny API.",
@ -169,7 +169,9 @@
"advancedParameters": "Parametry SSL i zaawansowane", "advancedParameters": "Parametry SSL i zaawansowane",
"headCreateProject": "Utwórz projekt |. NOCODB.", "headCreateProject": "Utwórz projekt |. NOCODB.",
"headLogin": "Zaloguj się | NOCODB.", "headLogin": "Zaloguj się | NOCODB.",
"resetPassword": "Zresetuj swoje hasło" "resetPassword": "Zresetuj swoje hasło",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Powiadomić VIA.", "notifyVia": "Powiadomić VIA.",

6
packages/nc-gui/lang/pt.json

@ -151,7 +151,7 @@
"lockedView": "Vista travada", "lockedView": "Vista travada",
"personalView": "Vista pessoal", "personalView": "Vista pessoal",
"appStore": "Loja de Aplicações", "appStore": "Loja de Aplicações",
"team&auth": "Equipa & Autenticação", "teamAndAuth": "Equipa & Autenticação",
"rolesUserMgmt": "Papéis & Gestão de Utilizadores", "rolesUserMgmt": "Papéis & Gestão de Utilizadores",
"userMgmt": "Gestão de Utilizadores", "userMgmt": "Gestão de Utilizadores",
"apiTokenMgmt": "Gestão de Tokens API Tokens", "apiTokenMgmt": "Gestão de Tokens API Tokens",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & parâmetros avançados", "advancedParameters": "SSL & parâmetros avançados",
"headCreateProject": "Criar Projecto | Noco", "headCreateProject": "Criar Projecto | Noco",
"headLogin": "Autentique-se | Noco", "headLogin": "Autentique-se | Noco",
"resetPassword": "Redefina a sua palavra-passe" "resetPassword": "Redefina a sua palavra-passe",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Notificar via.", "notifyVia": "Notificar via.",

6
packages/nc-gui/lang/pt_BR.json

@ -151,7 +151,7 @@
"lockedView": "Vista travada", "lockedView": "Vista travada",
"personalView": "Vista pessoal", "personalView": "Vista pessoal",
"appStore": "Loja de Aplicações", "appStore": "Loja de Aplicações",
"team&auth": "Time & Autenticação", "teamAndAuth": "Time & Autenticação",
"rolesUserMgmt": "Papéis & Gestão de Usuários", "rolesUserMgmt": "Papéis & Gestão de Usuários",
"userMgmt": "Gestão de Usuários", "userMgmt": "Gestão de Usuários",
"apiTokenMgmt": "Gestão de Tokens API", "apiTokenMgmt": "Gestão de Tokens API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & parâmetros avançados", "advancedParameters": "SSL & parâmetros avançados",
"headCreateProject": "Criar Projeto | NocoDB", "headCreateProject": "Criar Projeto | NocoDB",
"headLogin": "Autentique-se | NocoDB", "headLogin": "Autentique-se | NocoDB",
"resetPassword": "Redefina a sua senha" "resetPassword": "Redefina a sua senha",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Notificar via.", "notifyVia": "Notificar via.",

6
packages/nc-gui/lang/ru.json

@ -151,7 +151,7 @@
"lockedView": "Заблокированное представление", "lockedView": "Заблокированное представление",
"personalView": "Персональное представление", "personalView": "Персональное представление",
"appStore": "Магазин приложений", "appStore": "Магазин приложений",
"team&auth": "Пользватели и API", "teamAndAuth": "Пользватели и API",
"rolesUserMgmt": "Роли и управление пользователями", "rolesUserMgmt": "Роли и управление пользователями",
"userMgmt": "Управление пользователями", "userMgmt": "Управление пользователями",
"apiTokenMgmt": "Управление токенами API", "apiTokenMgmt": "Управление токенами API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL и расширенные параметры", "advancedParameters": "SSL и расширенные параметры",
"headCreateProject": "Создать проект |. NOCODB", "headCreateProject": "Создать проект |. NOCODB",
"headLogin": "Войти |. NOCODB", "headLogin": "Войти |. NOCODB",
"resetPassword": "Сбросить пароль" "resetPassword": "Сбросить пароль",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Уведомлять через", "notifyVia": "Уведомлять через",

6
packages/nc-gui/lang/sl.json

@ -151,7 +151,7 @@
"lockedView": "Zaklenjen pogled", "lockedView": "Zaklenjen pogled",
"personalView": "Osebni pogled", "personalView": "Osebni pogled",
"appStore": "Trgovina z aplikacijami", "appStore": "Trgovina z aplikacijami",
"team&auth": "Ekipa in avtorizacija", "teamAndAuth": "Ekipa in avtorizacija",
"rolesUserMgmt": "Upravljanje vlog in uporabnikov", "rolesUserMgmt": "Upravljanje vlog in uporabnikov",
"userMgmt": "Upravljanje uporabnikov", "userMgmt": "Upravljanje uporabnikov",
"apiTokenMgmt": "Upravljanje žetonov API", "apiTokenMgmt": "Upravljanje žetonov API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL in napredni parametri", "advancedParameters": "SSL in napredni parametri",
"headCreateProject": "Ustvari projekt | NocoDB.", "headCreateProject": "Ustvari projekt | NocoDB.",
"headLogin": "Prijava | Nocodb.", "headLogin": "Prijava | Nocodb.",
"resetPassword": "Ponastavi geslo" "resetPassword": "Ponastavi geslo",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Obvestite VIO.", "notifyVia": "Obvestite VIO.",

6
packages/nc-gui/lang/sv.json

@ -151,7 +151,7 @@
"lockedView": "Låst vy", "lockedView": "Låst vy",
"personalView": "Personlig utsikt", "personalView": "Personlig utsikt",
"appStore": "Appbutik", "appStore": "Appbutik",
"team&auth": "Team & Auth", "teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Roller och användarhantering", "rolesUserMgmt": "Roller och användarhantering",
"userMgmt": "Användarhantering", "userMgmt": "Användarhantering",
"apiTokenMgmt": "API Tokens Management", "apiTokenMgmt": "API Tokens Management",
@ -169,7 +169,9 @@
"advancedParameters": "SSL och avancerade parametrar", "advancedParameters": "SSL och avancerade parametrar",
"headCreateProject": "Skapa projekt | Nocodb", "headCreateProject": "Skapa projekt | Nocodb",
"headLogin": "Logga in | Nocodb", "headLogin": "Logga in | Nocodb",
"resetPassword": "Återställ ditt lösenord" "resetPassword": "Återställ ditt lösenord",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Meddela via", "notifyVia": "Meddela via",

6
packages/nc-gui/lang/th.json

@ -151,7 +151,7 @@
"lockedView": "มมมองลอค", "lockedView": "มมมองลอค",
"personalView": "มมมองสวนบคคล", "personalView": "มมมองสวนบคคล",
"appStore": "แอพสโตร", "appStore": "แอพสโตร",
"team&auth": "ทม & Auth", "teamAndAuth": "ทม & Auth",
"rolesUserMgmt": "บทบาทและผใชการจดการ", "rolesUserMgmt": "บทบาทและผใชการจดการ",
"userMgmt": "การจดการผใช", "userMgmt": "การจดการผใช",
"apiTokenMgmt": "การจดการโทเคน API", "apiTokenMgmt": "การจดการโทเคน API",
@ -169,7 +169,9 @@
"advancedParameters": "พารามเตอร SSL และขนสง", "advancedParameters": "พารามเตอร SSL และขนสง",
"headCreateProject": "สรางโครงการ | nocodb", "headCreateProject": "สรางโครงการ | nocodb",
"headLogin": "เขาสระบบ nocodb", "headLogin": "เขาสระบบ nocodb",
"resetPassword": "รเซตรหสผานของคณ" "resetPassword": "รเซตรหสผานของคณ",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "แจงเตอนผาน", "notifyVia": "แจงเตอนผาน",

6
packages/nc-gui/lang/tr.json

@ -151,7 +151,7 @@
"lockedView": "Kilitli görünüm", "lockedView": "Kilitli görünüm",
"personalView": "Kişisel görünüm", "personalView": "Kişisel görünüm",
"appStore": "Uygulama mağazası", "appStore": "Uygulama mağazası",
"team&auth": "Takım ve Yetki", "teamAndAuth": "Takım ve Yetki",
"rolesUserMgmt": "Roller ve Kullanıcıları Yönet", "rolesUserMgmt": "Roller ve Kullanıcıları Yönet",
"userMgmt": "Kullanıcıları Yönet", "userMgmt": "Kullanıcıları Yönet",
"apiTokenMgmt": "API Tokenları Yönet", "apiTokenMgmt": "API Tokenları Yönet",
@ -169,7 +169,9 @@
"advancedParameters": "SSL ve Gelişmiş Parametreler", "advancedParameters": "SSL ve Gelişmiş Parametreler",
"headCreateProject": "Proje Oluştur | Nocodb", "headCreateProject": "Proje Oluştur | Nocodb",
"headLogin": "Giriş | Nocodb", "headLogin": "Giriş | Nocodb",
"resetPassword": "Şifrenizi sıfırlayın" "resetPassword": "Şifrenizi sıfırlayın",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Aracılığıyla Bildir", "notifyVia": "Aracılığıyla Bildir",

6
packages/nc-gui/lang/uk.json

@ -151,7 +151,7 @@
"lockedView": "Заблокований вигляд", "lockedView": "Заблокований вигляд",
"personalView": "Особистий погляд", "personalView": "Особистий погляд",
"appStore": "App Store", "appStore": "App Store",
"team&auth": "Команда та автор", "teamAndAuth": "Команда та автор",
"rolesUserMgmt": "Ролі та управління користувачами", "rolesUserMgmt": "Ролі та управління користувачами",
"userMgmt": "Управління користувачами", "userMgmt": "Управління користувачами",
"apiTokenMgmt": "Управління токенами API", "apiTokenMgmt": "Управління токенами API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL і розширені параметри", "advancedParameters": "SSL і розширені параметри",
"headCreateProject": "Створити проект | Нокодб", "headCreateProject": "Створити проект | Нокодб",
"headLogin": "Вхід | Нокодб", "headLogin": "Вхід | Нокодб",
"resetPassword": "Скинути пароль" "resetPassword": "Скинути пароль",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Повідомити через", "notifyVia": "Повідомити через",

6
packages/nc-gui/lang/vi.json

@ -151,7 +151,7 @@
"lockedView": "LOCKED View.", "lockedView": "LOCKED View.",
"personalView": "Quan điểm cá nhân", "personalView": "Quan điểm cá nhân",
"appStore": "Cửa hàng ứng dụng", "appStore": "Cửa hàng ứng dụng",
"team&auth": "Đội & auth.", "teamAndAuth": "Đội & auth.",
"rolesUserMgmt": "Vai trò & Quản lý người dùng", "rolesUserMgmt": "Vai trò & Quản lý người dùng",
"userMgmt": "Quản lý người dùng", "userMgmt": "Quản lý người dùng",
"apiTokenMgmt": "Quản lý Token API", "apiTokenMgmt": "Quản lý Token API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Tham số nâng cao", "advancedParameters": "SSL & Tham số nâng cao",
"headCreateProject": "Tạo dự án |. NOCODB.", "headCreateProject": "Tạo dự án |. NOCODB.",
"headLogin": "Đăng nhập |. NOCODB.", "headLogin": "Đăng nhập |. NOCODB.",
"resetPassword": "Đặt lại mật khẩu của bạn" "resetPassword": "Đặt lại mật khẩu của bạn",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "Thông báo qua", "notifyVia": "Thông báo qua",

6
packages/nc-gui/lang/zh_CN.json

@ -151,7 +151,7 @@
"lockedView": "锁定视图", "lockedView": "锁定视图",
"personalView": "个人观", "personalView": "个人观",
"appStore": "软件商店", "appStore": "软件商店",
"team&auth": "团队和认证", "teamAndAuth": "团队和认证",
"rolesUserMgmt": "角色和用户管理", "rolesUserMgmt": "角色和用户管理",
"userMgmt": "用户账号管理", "userMgmt": "用户账号管理",
"apiTokenMgmt": "API 令牌管理", "apiTokenMgmt": "API 令牌管理",
@ -169,7 +169,9 @@
"advancedParameters": "SSL 和高级参数", "advancedParameters": "SSL 和高级参数",
"headCreateProject": "新建项目 | NocoDB", "headCreateProject": "新建项目 | NocoDB",
"headLogin": "登录 | NocoDB", "headLogin": "登录 | NocoDB",
"resetPassword": "重置密码" "resetPassword": "重置密码",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "通知Via", "notifyVia": "通知Via",

6
packages/nc-gui/lang/zh_HK.json

@ -151,7 +151,7 @@
"lockedView": "鎖定視圖", "lockedView": "鎖定視圖",
"personalView": "個人觀", "personalView": "個人觀",
"appStore": "應用商店", "appStore": "應用商店",
"team&auth": "團隊&auth", "teamAndAuth": "團隊&auth",
"rolesUserMgmt": "角色和用戶管理", "rolesUserMgmt": "角色和用戶管理",
"userMgmt": "用戶管理", "userMgmt": "用戶管理",
"apiTokenMgmt": "API Tokens 管理", "apiTokenMgmt": "API Tokens 管理",
@ -169,7 +169,9 @@
"advancedParameters": "安全證書及高級參數", "advancedParameters": "安全證書及高級參數",
"headCreateProject": "開新Project | NocoDB", "headCreateProject": "開新Project | NocoDB",
"headLogin": "登入 | NocoDB", "headLogin": "登入 | NocoDB",
"resetPassword": "reset你嗰密碼" "resetPassword": "reset你嗰密碼",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "通知Via", "notifyVia": "通知Via",

6
packages/nc-gui/lang/zh_TW.json

@ -151,7 +151,7 @@
"lockedView": "鎖定視圖", "lockedView": "鎖定視圖",
"personalView": "個人觀", "personalView": "個人觀",
"appStore": "應用程式商店", "appStore": "應用程式商店",
"team&auth": "團隊和認證", "teamAndAuth": "團隊和認證",
"rolesUserMgmt": "角色和使用者管理", "rolesUserMgmt": "角色和使用者管理",
"userMgmt": "使用者管理", "userMgmt": "使用者管理",
"apiTokenMgmt": "API 權杖管理", "apiTokenMgmt": "API 權杖管理",
@ -169,7 +169,9 @@
"advancedParameters": "SSL 及進階參數", "advancedParameters": "SSL 及進階參數",
"headCreateProject": "建立新專案|NocoDB", "headCreateProject": "建立新專案|NocoDB",
"headLogin": "登入|NocoDB", "headLogin": "登入|NocoDB",
"resetPassword": "重設密碼" "resetPassword": "重設密碼",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
}, },
"labels": { "labels": {
"notifyVia": "通知Via", "notifyVia": "通知Via",

1
packages/nc-gui/pages/projects/index.vue

@ -163,6 +163,7 @@
:search="search" :search="search"
:footer-props="{ :footer-props="{
'items-per-page-options': [20, -1], 'items-per-page-options': [20, -1],
'items-per-page-text': $t('msg.info.footerInfo')
}" }"
class="pa-4 text-left mx-auto" class="pa-4 text-left mx-auto"
style="cursor: pointer; max-width: 100%" style="cursor: pointer; max-width: 100%"

12
packages/noco-docs/content/en/setup-and-usages/formulas.md

@ -81,12 +81,12 @@ Example: (column1 + (column2 * column3) / (3 - column4 ))
### Date Functions ### Date Functions
| Name | Syntax | Sample | Output | | Name | Syntax | Sample | Output | Remark |
|-------------|-----------------------------------------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------------------------------| |---|---|---|---|---|
| **DATEADD** | `DATEADD(DATE_COL, 1, 'day')` | `DATEADD(date, 1, 'day')` | Supposing the DATE_COL is 2022-03-14. The result is 2022-03-15. | | **DATEADD** | `DATEADD(DATE_COL, 1, 'day')` | `DATEADD(date, 1, 'day')` | Supposing the DATE_COL is 2022-03-14. The result is 2022-03-15. | DateTime columns and negative values are supported. Example: `DATEADD(DATE_TIME_COL, -1, 'day')` |
| | `DATEADD(DATE_TIME_COL, 2, 'month')` | `DATEADD(datetime, 2, 'month')` | Supposing the DATE_COL is 2022-03-14 03:14. The result is 2022-05-14 03:14. | | | `DATEADD(DATE_COL, 2, 'month')` | `DATEADD(date, 2, 'month')` | Supposing the DATE_COL is 2022-03-14 03:14. The result is 2022-05-14 03:14. | DateTime columns and negative values are supported. Example: `DATEADD(DATE_TIME_COL, -2, 'month')` |
| | `IF(NOW() < DATE_COL, "true", "false")` | `IF(NOW() < date, "true", "false")` | If current date is less than DATE_COL, it returns true. Otherwise, it returns false. | | | `IF(NOW() < DATE_COL, "true", "false")` | `IF(NOW() < date, "true", "false")` | If current date is less than DATE_COL, it returns true. Otherwise, it returns false. | DateTime columns and negative values are supported. |
| | `IF(NOW() < DATEADD(DATE_COL,10,'day'), "true", "false")` | `IF(NOW() < DATEADD(date,10,'day'), "true", "false")` | If the current date is less than DATE_COL plus 10 days, it returns true. Otherwise, it returns false. | | | `IF(NOW() < DATEADD(DATE_COL,10,'day'), "true", "false")` | `IF(NOW() < DATEADD(date,10,'day'), "true", "false")` | If the current date is less than DATE_COL plus 10 days, it returns true. Otherwise, it returns false. | DateTime columns and negative values are supported. |
### Logical Operators ### Logical Operators

17
packages/nocodb/src/lib/dataMapper/lib/sql/formulav2/formulaQueryBuilderv2.ts

@ -564,15 +564,6 @@ export default async function formulaQueryBuilderv2(
} }
} }
break; break;
case 'DATEADD':
if (pt.arguments[1].value) {
pt.callee.name = 'DATE_ADD';
return fn(pt, alias, prevBinaryOp);
} else if (pt.arguments[1].operator == '-') {
pt.callee.name = 'DATE_SUB';
return fn(pt, alias, prevBinaryOp);
}
break;
case 'URL': case 'URL':
return fn( return fn(
{ {
@ -654,6 +645,14 @@ export default async function formulaQueryBuilderv2(
query.wrap('(', ')'); query.wrap('(', ')');
} }
return query; return query;
} else if (pt.type === 'UnaryExpression') {
const query = knex.raw(
`${pt.operator}${fn(pt.argument, null, pt.operator).toQuery()}${colAlias}`
);
if (prevBinaryOp && pt.operator !== prevBinaryOp) {
query.wrap('(', ')');
}
return query;
} }
}; };
return { builder: fn(tree, alias) }; return { builder: fn(tree, alias) };

23
packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/mssql.ts

@ -89,31 +89,16 @@ const mssql = {
.raw(`CAST(${args.fn(args.pt.arguments[0])} as FLOAT)${args.colAlias}`) .raw(`CAST(${args.fn(args.pt.arguments[0])} as FLOAT)${args.colAlias}`)
.wrap('(', ')'); .wrap('(', ')');
}, },
DATE_ADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => { DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
const dateIN = fn(pt.arguments[1]);
return knex.raw( return knex.raw(
`CASE `CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')}, FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')},
+${fn(pt.arguments[1])}, ${fn(pt.arguments[0])}), 'yyyy-MM-dd HH:mm') ${dateIN > 0 ? '+' : ''}${fn(pt.arguments[1])}, ${fn(pt.arguments[0])}), 'yyyy-MM-dd HH:mm')
ELSE ELSE
FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')}, FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')},
+${fn(pt.arguments[1])}, ${fn(pt.arguments[0])}), 'yyyy-MM-dd') ${dateIN > 0 ? '+' : ''}${fn(pt.arguments[1])}, ${fn(pt.arguments[0])}), 'yyyy-MM-dd')
END${colAlias}`
);
},
DATE_SUB: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')},
-${fn(pt.arguments[1])}.argument.value, ${fn(
pt.arguments[0]
)}), 'yyyy-MM-dd HH:mm')
ELSE
FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')},
-${fn(pt.arguments[1])}.argument.value, ${fn(
pt.arguments[0]
)}), 'yyyy-MM-dd')
END${colAlias}` END${colAlias}`
); );
} }

16
packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/mysql.ts

@ -37,7 +37,7 @@ const mysql2 = {
.raw(`CAST(${args.fn(args.pt.arguments[0])} as DOUBLE)${args.colAlias}`) .raw(`CAST(${args.fn(args.pt.arguments[0])} as DOUBLE)${args.colAlias}`)
.wrap('(', ')'); .wrap('(', ')');
}, },
DATE_ADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => { DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw( return knex.raw(
`CASE `CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
@ -54,20 +54,6 @@ const mysql2 = {
)})) )}))
END${colAlias}` END${colAlias}`
); );
},
DATE_SUB: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
DATE_FORMAT(DATE_ADD(${fn(pt.arguments[0])}, INTERVAL
${fn(pt.arguments[1])}.argument.value
${String(fn(pt.arguments[2])).replace(/["']/g, '')}), '%Y-%m-%d %H:%i')
ELSE
DATE(DATE_ADD(${fn(pt.arguments[0])}, INTERVAL
${fn(pt.arguments[1])}.argument.value
${String(fn(pt.arguments[2])).replace(/["']/g, '')}))
END${colAlias}`
);
} }
}; };

29
packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/pg.ts

@ -33,37 +33,18 @@ const pg = {
.raw(`CAST(${fn(pt.arguments[0])} as DOUBLE PRECISION)${colAlias}`) .raw(`CAST(${fn(pt.arguments[0])} as DOUBLE PRECISION)${colAlias}`)
.wrap('(', ')'); .wrap('(', ')');
}, },
DATE_ADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => { DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw( return knex.raw(
`CASE `CASE
WHEN CAST(${fn(pt.arguments[0])} AS text) LIKE '%:%' THEN WHEN CAST(${fn(pt.arguments[0])} AS text) LIKE '%:%' THEN
to_char(${fn(pt.arguments[0])} + INTERVAL '${fn(pt.arguments[1])} ${fn(pt.arguments[0])} + INTERVAL '${fn(pt.arguments[1])}
${String(fn(pt.arguments[2])).replace( ${String(fn(pt.arguments[2])).replace(
/["']/g, /["']/g,
'' ''
)}', 'YYYY-MM-DD HH24:MI') )}'
ELSE ELSE
to_char(${fn(pt.arguments[0])} + INTERVAL '${fn(pt.arguments[1])} ${fn(pt.arguments[0])} + INTERVAL '${fn(pt.arguments[1])}
${String(fn(pt.arguments[2])).replace(/["']/g, '')}', 'YYYY-MM-DD') ${String(fn(pt.arguments[2])).replace(/["']/g, '')}'
END${colAlias}`
);
},
DATE_SUB: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN CAST(${fn(pt.arguments[0])} AS text) LIKE '%:%' THEN
to_char(${fn(pt.arguments[0])} - INTERVAL '${
fn(pt.arguments[1]).argument.value
}
${String(fn(pt.arguments[2])).replace(
/["']/g,
''
)}', 'YYYY-MM-DD HH24:MI')
ELSE
to_char(${fn(pt.arguments[0])} - INTERVAL '${
fn(pt.arguments[1]).argument.value
}
${String(fn(pt.arguments[2])).replace(/["']/g, '')}', 'YYYY-MM-DD')
END${colAlias}` END${colAlias}`
); );
} }

25
packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/sqlite.ts

@ -56,43 +56,26 @@ const sqlite3 = {
.raw(`CAST(${args.fn(args.pt.arguments[0])} as FLOAT)${args.colAlias}`) .raw(`CAST(${args.fn(args.pt.arguments[0])} as FLOAT)${args.colAlias}`)
.wrap('(', ')'); .wrap('(', ')');
}, },
DATE_ADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => { DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
const dateIN = fn(pt.arguments[1]);
return knex.raw( return knex.raw(
`CASE `CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${fn( STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${fn(
pt.arguments[0] pt.arguments[0]
)}, 'localtime'), )}, 'localtime'),
'+${fn(pt.arguments[1])} ${String(fn(pt.arguments[2])).replace( '${dateIN > 0 ? '+' : ''}${fn(pt.arguments[1])} ${String(fn(pt.arguments[2])).replace(
/["']/g, /["']/g,
'' ''
)}')) )}'))
ELSE ELSE
DATE(DATETIME(${fn(pt.arguments[0])}, 'localtime'), DATE(DATETIME(${fn(pt.arguments[0])}, 'localtime'),
'+${fn(pt.arguments[1])} ${String(fn(pt.arguments[2])).replace( '${dateIN > 0 ? '+' : ''}${fn(pt.arguments[1])} ${String(fn(pt.arguments[2])).replace(
/["']/g, /["']/g,
'' ''
)}') )}')
END${colAlias}` END${colAlias}`
); );
},
DATE_SUB: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${fn(
pt.arguments[0]
)}, 'localtime'),
'-${fn(pt.arguments[1]).argument.value} ${String(
fn(pt.arguments[2])
).replace(/["']/g, '')}'))
ELSE
DATE(DATETIME(${fn(pt.arguments[0])}, 'localtime'),
'-${fn(pt.arguments[1]).argument.value} ${String(
fn(pt.arguments[2])
).replace(/["']/g, '')}')
END${colAlias}`
);
} }
}; };

Loading…
Cancel
Save