Browse Source

chore: lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5175/head
Pranav C 2 years ago
parent
commit
9c6d2af45a
  1. 1
      packages/nc-gui/components/virtual-cell/components/ListItems.vue
  2. 11
      packages/nocodb/src/lib/db/sql-mgr/SqlMgr.ts
  3. 4
      packages/nocodb/src/lib/db/sql-migrator/lib/KnexMigratorv2.ts
  4. 11
      packages/nocodb/src/lib/db/sql-migrator/lib/KnexMigratorv2Tans.ts
  5. 2
      packages/nocodb/src/lib/meta/helpers/mapDefaultDisplayValue.ts
  6. 2
      packages/nocodb/src/lib/version-upgrader/ncStickyColumnUpgrader.ts

1
packages/nc-gui/components/virtual-cell/components/ListItems.vue

@ -252,7 +252,6 @@ watch(vModel, (nextVal) => {
</div>
</template>
<a-empty v-else class="my-10" :image="Empty.PRESENTED_IMAGE_SIMPLE" />
<Suspense>

11
packages/nocodb/src/lib/db/sql-mgr/SqlMgr.ts

@ -345,7 +345,16 @@ export default class SqlMgr {
* @returns
* @memberof SqlMgr
*/
public async projectGetSqlClient(args): Promise<SnowflakeClient | MysqlClient | SqliteClient | MssqlClient | OracleClient | PGClient> {
public async projectGetSqlClient(
args
): Promise<
| SnowflakeClient
| MysqlClient
| SqliteClient
| MssqlClient
| OracleClient
| PGClient
> {
const func = this.projectGetSqlClient.name;
log.api(`${func}:args:`, args);

4
packages/nocodb/src/lib/db/sql-migrator/lib/KnexMigratorv2.ts

@ -754,7 +754,7 @@ export default class KnexMigratorv2 {
const vm = this;
const trx = sqlClient.knex.isTransaction
? sqlClient.knex as Knex.Transaction
? (sqlClient.knex as Knex.Transaction)
: await sqlClient.knex.transaction();
try {
for (const query of upStatements) {
@ -921,7 +921,7 @@ export default class KnexMigratorv2 {
const vm = this;
const trx = sqlClient.knex.isTransaction
? sqlClient.knex as Knex.Transaction
? (sqlClient.knex as Knex.Transaction)
: await sqlClient.knex.transaction();
try {
for (const query of downStatements) {

11
packages/nocodb/src/lib/db/sql-migrator/lib/KnexMigratorv2Tans.ts

@ -31,7 +31,16 @@ export default class KnexMigratorv2Tans extends KnexMigratorv2 {
protected get metaDb(): XKnex {
return this.ncMeta.knex || Noco.ncMeta.knex;
}
protected async getSqlClient(base: Base): Promise<SnowflakeClient | MysqlClient | SqliteClient | MssqlClient | OracleClient | PGClient> {
protected async getSqlClient(
base: Base
): Promise<
| SnowflakeClient
| MysqlClient
| SqliteClient
| MssqlClient
| OracleClient
| PGClient
> {
return this.sqlClient || NcConnectionMgrv2.getSqlClient(base);
}
}

2
packages/nocodb/src/lib/meta/helpers/mapDefaultDisplayValue.ts

@ -4,7 +4,7 @@ export default function mapDefaultDisplayValue<T extends ColumnType>(
columnsArr: Array<T>
): void | T {
if (!columnsArr.some((column) => column.pv)) {
const pkIndex = columnsArr.findIndex((column) => column.pk)
const pkIndex = columnsArr.findIndex((column) => column.pk);
// if PK is at the end of table
if (pkIndex === columnsArr.length - 1) {

2
packages/nocodb/src/lib/version-upgrader/ncStickyColumnUpgrader.ts

@ -40,7 +40,7 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
// if no display value column is set
if (!view_columns_meta.some((column) => column.pv)) {
const pkIndex = view_columns_meta.findIndex((column) => column.pk)
const pkIndex = view_columns_meta.findIndex((column) => column.pk);
// if PK is at the end of table
if (pkIndex === view_columns_meta.length - 1) {

Loading…
Cancel
Save