@clickup/pg-microsharding
Version:
Microshards support for PostgreSQL
25 lines (15 loc) • 1.01 kB
Markdown
[**@clickup/pg-microsharding**](../README.md)
***
[@clickup/pg-microsharding](../globals.md) / calcIslandWeights
# Function: calcIslandWeights()
> **calcIslandWeights**(`__namedParameters`): `Promise`\<\{ `islandNosToDsn`: `Map`\<`number`, `string`\>; `islands`: `Map`\<`number`, `NonNullable`\<`Awaited`\<`ReturnType`\<*typeof* [`weights`](weights.md)\>\>\>\>; \}\>
Defined in: [src/actions/actionList.ts:216](https://github.com/clickup/pg-microsharding/blob/master/src/actions/actionList.ts#L216)
## Parameters
| Parameter | Type |
| ------ | ------ |
| `__namedParameters` | \{ `dsns`: `string`[]; `weightSql`: `undefined` \| `string`; `verbose`: `boolean`; \} |
| `__namedParameters.dsns` | `string`[] |
| `__namedParameters.weightSql` | `undefined` \| `string` |
| `__namedParameters.verbose`? | `boolean` |
## Returns
`Promise`\<\{ `islandNosToDsn`: `Map`\<`number`, `string`\>; `islands`: `Map`\<`number`, `NonNullable`\<`Awaited`\<`ReturnType`\<*typeof* [`weights`](weights.md)\>\>\>\>; \}\>