diff --git a/.astro/astro/content.d.ts b/.astro/astro/content.d.ts index 913a458..e69de29 100644 --- a/.astro/astro/content.d.ts +++ b/.astro/astro/content.d.ts @@ -1,642 +0,0 @@ -declare module 'astro:content' { - interface Render { - '.mdx': Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - components: import('astro').MDXInstance<{}>['components']; - }>; - } -} - -declare module 'astro:content' { - interface RenderResult { - Content: import('astro/runtime/server/index.js').AstroComponentFactory; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - } - interface Render { - '.md': Promise; - } - - export interface RenderedContent { - html: string; - metadata?: { - imagePaths: Array; - [key: string]: unknown; - }; - } -} - -declare module 'astro:content' { - type Flatten = T extends { [K: string]: infer U } ? U : never; - - export type CollectionKey = keyof AnyEntryMap; - export type CollectionEntry = Flatten; - - export type ContentCollectionKey = keyof ContentEntryMap; - export type DataCollectionKey = keyof DataEntryMap; - - type AllValuesOf = T extends any ? T[keyof T] : never; - type ValidContentEntrySlug = AllValuesOf< - ContentEntryMap[C] - >['slug']; - - /** @deprecated Use `getEntry` instead. */ - export function getEntryBySlug< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >( - collection: C, - // Note that this has to accept a regular string too, for SSR - entrySlug: E, - ): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - - /** @deprecated Use `getEntry` instead. */ - export function getDataEntryById( - collection: C, - entryId: E, - ): Promise>; - - export function getCollection>( - collection: C, - filter?: (entry: CollectionEntry) => entry is E, - ): Promise; - export function getCollection( - collection: C, - filter?: (entry: CollectionEntry) => unknown, - ): Promise[]>; - - export function getEntry< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >(entry: { - collection: C; - slug: E; - }): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >(entry: { - collection: C; - id: E; - }): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; - export function getEntry< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >( - collection: C, - slug: E, - ): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >( - collection: C, - id: E, - ): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; - - /** Resolve an array of entry references from the same collection */ - export function getEntries( - entries: { - collection: C; - slug: ValidContentEntrySlug; - }[], - ): Promise[]>; - export function getEntries( - entries: { - collection: C; - id: keyof DataEntryMap[C]; - }[], - ): Promise[]>; - - export function render( - entry: AnyEntryMap[C][string], - ): Promise; - - export function reference( - collection: C, - ): import('astro/zod').ZodEffects< - import('astro/zod').ZodString, - C extends keyof ContentEntryMap - ? { - collection: C; - slug: ValidContentEntrySlug; - } - : { - collection: C; - id: keyof DataEntryMap[C]; - } - >; - // Allow generic `string` to avoid excessive type errors in the config - // if `dev` is not running to update as you edit. - // Invalid collection names will be caught at build time. - export function reference( - collection: C, - ): import('astro/zod').ZodEffects; - - type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; - type InferEntrySchema = import('astro/zod').infer< - ReturnTypeOrOriginal['schema']> - >; - - type ContentEntryMap = { - "docs": { -"browsers/goToFile.mdx": { - id: "browsers/goToFile.mdx"; - slug: "browsers/gotofile"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"browsers/ifs-browser.mdx": { - id: "browsers/ifs-browser.mdx"; - slug: "browsers/ifs-browser"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"browsers/index.mdx": { - id: "browsers/index.mdx"; - slug: "browsers"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"browsers/object-browser.mdx": { - id: "browsers/object-browser.mdx"; - slug: "browsers/object-browser"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"browsers/user-library-list.mdx": { - id: "browsers/user-library-list.mdx"; - slug: "browsers/user-library-list"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"dev/api.md": { - id: "dev/api.md"; - slug: "dev/api"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"dev/debugger.mdx": { - id: "dev/debugger.mdx"; - slug: "dev/debugger"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"dev/examples.mdx": { - id: "dev/examples.mdx"; - slug: "dev/examples"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"dev/getting_started.mdx": { - id: "dev/getting_started.mdx"; - slug: "dev/getting_started"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"dev/scope.mdx": { - id: "dev/scope.mdx"; - slug: "dev/scope"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"dev/variables.mdx": { - id: "dev/variables.mdx"; - slug: "dev/variables"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/actions/custom-vars.mdx": { - id: "developing/actions/custom-vars.mdx"; - slug: "developing/actions/custom-vars"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/actions/execution.mdx": { - id: "developing/actions/execution.mdx"; - slug: "developing/actions/execution"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/actions/index.mdx": { - id: "developing/actions/index.mdx"; - slug: "developing/actions"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/debug/configure.mdx": { - id: "developing/debug/configure.mdx"; - slug: "developing/debug/configure"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/debug/overview.mdx": { - id: "developing/debug/overview.mdx"; - slug: "developing/debug/overview"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/editing-compiling.mdx": { - id: "developing/editing-compiling.mdx"; - slug: "developing/editing-compiling"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/iledocs.mdx": { - id: "developing/iledocs.mdx"; - slug: "developing/iledocs"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/local/actions.mdx": { - id: "developing/local/actions.mdx"; - slug: "developing/local/actions"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/local/azure.mdx": { - id: "developing/local/azure.mdx"; - slug: "developing/local/azure"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/local/getting-started.mdx": { - id: "developing/local/getting-started.mdx"; - slug: "developing/local/getting-started"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/local/git.mdx": { - id: "developing/local/git.mdx"; - slug: "developing/local/git"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/local/gitflow.mdx": { - id: "developing/local/gitflow.mdx"; - slug: "developing/local/gitflow"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/local/migrate.mdx": { - id: "developing/local/migrate.mdx"; - slug: "developing/local/migrate"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/local/structure.mdx": { - id: "developing/local/structure.mdx"; - slug: "developing/local/structure"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/sourcedates.mdx": { - id: "developing/sourcedates.mdx"; - slug: "developing/sourcedates"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/testing/cli.mdx": { - id: "developing/testing/cli.mdx"; - slug: "developing/testing/cli"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/testing/configuring.mdx": { - id: "developing/testing/configuring.mdx"; - slug: "developing/testing/configuring"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/testing/overview.mdx": { - id: "developing/testing/overview.mdx"; - slug: "developing/testing/overview"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/testing/running.mdx": { - id: "developing/testing/running.mdx"; - slug: "developing/testing/running"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/testing/troubleshooting.mdx": { - id: "developing/testing/troubleshooting.mdx"; - slug: "developing/testing/troubleshooting"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"developing/testing/writing.mdx": { - id: "developing/testing/writing.mdx"; - slug: "developing/testing/writing"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/clle/index.mdx": { - id: "extensions/clle/index.mdx"; - slug: "extensions/clle"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/db2i/AI/Copilot/index.mdx": { - id: "extensions/db2i/AI/Copilot/index.mdx"; - slug: "extensions/db2i/ai/copilot"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/db2i/AI/code-assistant.mdx": { - id: "extensions/db2i/AI/code-assistant.mdx"; - slug: "extensions/db2i/ai/code-assistant"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/db2i/AI/roadmap.mdx": { - id: "extensions/db2i/AI/roadmap.mdx"; - slug: "extensions/db2i/ai/roadmap"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/db2i/AI/use-cases.mdx": { - id: "extensions/db2i/AI/use-cases.mdx"; - slug: "extensions/db2i/ai/use-cases"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/db2i/index.mdx": { - id: "extensions/db2i/index.mdx"; - slug: "extensions/db2i"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/ibmi-fs/index.mdx": { - id: "extensions/ibmi-fs/index.mdx"; - slug: "extensions/ibmi-fs"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/ibmi-fs/objects.mdx": { - id: "extensions/ibmi-fs/objects.mdx"; - slug: "extensions/ibmi-fs/objects"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/ibmi-fs/views.mdx": { - id: "extensions/ibmi-fs/views.mdx"; - slug: "extensions/ibmi-fs/views"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/renderer/index.mdx": { - id: "extensions/renderer/index.mdx"; - slug: "extensions/renderer"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/rpgle/faq.mdx": { - id: "extensions/rpgle/faq.mdx"; - slug: "extensions/rpgle/faq"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/rpgle/index.mdx": { - id: "extensions/rpgle/index.mdx"; - slug: "extensions/rpgle"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"extensions/rpgle/linter.mdx": { - id: "extensions/rpgle/linter.mdx"; - slug: "extensions/rpgle/linter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"help-and-support.mdx": { - id: "help-and-support.mdx"; - slug: "help-and-support"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"index.mdx": { - id: "index.mdx"; - slug: "index"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"install.mdx": { - id: "install.mdx"; - slug: "install"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"quickstart.mdx": { - id: "quickstart.mdx"; - slug: "quickstart"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"settings/connection.mdx": { - id: "settings/connection.mdx"; - slug: "settings/connection"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"settings/global.mdx": { - id: "settings/global.mdx"; - slug: "settings/global"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"settings/profiles.mdx": { - id: "settings/profiles.mdx"; - slug: "settings/profiles"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"settings/system.mdx": { - id: "settings/system.mdx"; - slug: "settings/system"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/asp.mdx": { - id: "tips/asp.mdx"; - slug: "tips/asp"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/bash.mdx": { - id: "tips/bash.mdx"; - slug: "tips/bash"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/ccsid.mdx": { - id: "tips/ccsid.mdx"; - slug: "tips/ccsid"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/protect.mdx": { - id: "tips/protect.mdx"; - slug: "tips/protect"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/secure.mdx": { - id: "tips/secure.mdx"; - slug: "tips/secure"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/secure_ssh.mdx": { - id: "tips/secure_ssh.mdx"; - slug: "tips/secure_ssh"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/setup.mdx": { - id: "tips/setup.mdx"; - slug: "tips/setup"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/seuColours.mdx": { - id: "tips/seuColours.mdx"; - slug: "tips/seucolours"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/structured-download.mdx": { - id: "tips/structured-download.mdx"; - slug: "tips/structured-download"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/terminals.mdx": { - id: "tips/terminals.mdx"; - slug: "tips/terminals"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"tips/tricks.mdx": { - id: "tips/tricks.mdx"; - slug: "tips/tricks"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"workshop/db2i/index.mdx": { - id: "workshop/db2i/index.mdx"; - slug: "workshop/db2i"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"workshop/git/index.mdx": { - id: "workshop/git/index.mdx"; - slug: "workshop/git"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"workshop/index.mdx": { - id: "workshop/index.mdx"; - slug: "workshop"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"workshop/node/index.mdx": { - id: "workshop/node/index.mdx"; - slug: "workshop/node"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -}; - - }; - - type DataEntryMap = { - - }; - - type AnyEntryMap = ContentEntryMap & DataEntryMap; - - export type ContentConfig = typeof import("../../src/content/config.js"); -} diff --git a/src/assets/settings/mapepire_01.png b/src/assets/settings/mapepire_01.png new file mode 100644 index 0000000..9e07049 Binary files /dev/null and b/src/assets/settings/mapepire_01.png differ diff --git a/src/assets/settings/mapepire_02.png b/src/assets/settings/mapepire_02.png new file mode 100644 index 0000000..d06fe0a Binary files /dev/null and b/src/assets/settings/mapepire_02.png differ diff --git a/src/assets/settings/mapepire_03.png b/src/assets/settings/mapepire_03.png new file mode 100644 index 0000000..06a956c Binary files /dev/null and b/src/assets/settings/mapepire_03.png differ diff --git a/src/content/docs/extensions/db2i/index.mdx b/src/content/docs/extensions/db2i/index.mdx index fbfc6e4..da85a14 100644 --- a/src/content/docs/extensions/db2i/index.mdx +++ b/src/content/docs/extensions/db2i/index.mdx @@ -16,9 +16,6 @@ The Db2 for i extension allows users to browse database schemas, execute SQL sta The extension can be [installed from the Marketplace](https://marketplace.visualstudio.com/items?itemName=HalcyonTechLtd.vscode-db2i) and is also part of the [IBM i Development Pack](https://marketplace.visualstudio.com/items?itemName=HalcyonTechLtd.ibm-i-development-pack). -### Server Component - -As of 0.3.0, the Db2 for i extension requires a server component. The component provides improved performance and makes it easy for us to add advanced features. The Db2 for i extension manages the server component installation when you connect to an IBM i with Code for IBM i and will ask the user to confirm any installation or update. The server component is installed into `$HOME/.vscode`, which means a per-user installation. [The server component is also open-source](https://github.com/Mapepire-IBMi/mapepire-server). ## Executing Statements diff --git a/src/content/docs/install.mdx b/src/content/docs/install.mdx index 8c8b188..a6a2f10 100644 --- a/src/content/docs/install.mdx +++ b/src/content/docs/install.mdx @@ -13,6 +13,7 @@ import { CardGrid, Card, Badge, LinkCard, Icon } from '@astrojs/starlight/compon - (Licensed program 5733-SC1 provides SSH support.) - `STRTCPSVR *SSHD` starts the daemon. - User `QSSHD` is enabled. +- Java 8 minimum must be installed to run Mapepire - Some familiarity with VS Code. An introduction can be found [here](https://code.visualstudio.com/docs/getstarted/introvideos). Optionally, ensure you know how to connect to pase from a shell. See this [official IBM i OSS docs](https://ibmi-oss-docs.readthedocs.io/latest/user_setup/README.html#step-1-install-an-ssh-client). diff --git a/src/content/docs/settings/mapepire.mdx b/src/content/docs/settings/mapepire.mdx new file mode 100644 index 0000000..c79292f --- /dev/null +++ b/src/content/docs/settings/mapepire.mdx @@ -0,0 +1,76 @@ +--- +title: Mapepire +--- + +import { Aside, CardGrid, Card } from '@astrojs/starlight/components'; + +Since version 3, Code for IBM i uses Mapepire to access Db2 for i and run queries. Mapepire is a database access layer that can be used in Single mode (through Code for IBM i SSH channel) or in Server mode (through HTTP). + +Mapepire can run in two distinct mode. The mode used by Code for IBM i is determined by the `Connect to remote Mapepire server` connection settings described below. + +## Single mode +This is the mode used by default by Code for IBM i. In this mode, Mapepire is started in the SSH channel opened from VS Code, and it runs indefinitely in that channel, reading requests from the channel's standard input and replying on the channel's standard output. Mapepire is started by Code for IBM i when you connect to the IBM i. Every connection made from VS Code this way creates a Mapepire Java process. + +The default mode used by Code for IBM i. Mapepire is started by Code for IBM i in an SSH channel opened from VS Code, when you first connect to the IBM i. On the IBM i it creates a Java JVM that exists until you disconnect. Mapepire runs endlessly in its SSH channel, reading requests from the channel's standard input and replying on the channel's standard output. + +Think of Mapepire as a bridge between VS Code and Db2 for i in this case. The single mode is started using `--single` as an argument when running the mapepire.jar file. + +![assets/mapepire_01.png](/src/assets/settings/mapepire_02.png) + +When connecting and using single mode, Code for IBM i will upload the Mapepire jar file under the current user `.vscode` folder under their home directory before starting Mapepire. (i.e. the remote file is `~/.vscode/mapepire-server-X.Y.Z.jar`). Code for IBM i takes care of checking and updating the jar file when needed. + +Single mode does not require a HTTPS connection and this may be easier if there are network restrictions. **_But_** when connecting, starting Mapepire adds the overhead of starting a JVM which can be slow on IBM i. And if there are many connections more IBM i resources may be consumed which might be significant on a smaller machine. And using the `Db2 for i extension` also creates another SSH channel with its own JVM. + +## Server mode +Mapepire is assumed to have been started beforehand and is running on IBM i. It acts as a shared database server, handling every connection coming from clients (through HTTPS, by default on port `8076`). This one server is used by everyone and to maintain security it must know your password. + +When using Server mode, Mapepire is assumed to be started beforehand and running on IBM i. As its name implies, it acts as a server, handling every connection coming from clients on port `8076`, by default. One server is used by everyone. Mapepire is not meant to be started from by clients in this case, it wouldn't make sense. hence why it is assumed that it will be running on the remote IBM i. Every client connects to it through HTTPS. + +Mapepire server mode is started using no argument when running the mapepire.jar file. See [Server Install/Config](https://mapepire-ibmi.github.io/guides/sysadmin/) + +![assets/mapepire_01.png](/src/assets/settings/mapepire_03.png) + +When connecting and using Server mode, Code for IBM i doesn't upload and use the Mapepire jar file. + +Server mode makes the connection faster and it consumes fewer resources globally on the IBM i. **_But_** it requires more initial work on the sys admin side to set up and ensure it is running. + +## Pros and cons + +## Client settings + + Every Mapepire client settings a regrouped under the connection settings' `Mapepire` tab. + ![assets/mapepire_01.png](/src/assets/settings/mapepire_01.png) + + +#### Use secure SQL connection +Turning this on will force Mapepire to establish a secured JDBC connection (i.e. it sets the `secure` JDBC option to true). The connection is secured using `TLS` between Mapepire and the Database Server daemon (the `QZDASRVSD` job). Turning this on requires the Database Server daemon to use a valid certificate and accept connections on its secure port (`9471` by default). You can also read more about [configuring Host Servers with TLS using Navigator for i +](https://www.ibm.com/support/pages/configure-host-servers-tls-using-navigator-i). + +#### SQL Job Naming +The naming convention used by the databse job. This setting will affect the syntax and how unqualified SQL objects are resolved. +- **System**: system naming convention. Separator to qualify object can be `/` or `.`. The library list is used to resolve unqualified objects. +- **SQL**: SQL naming convention. Separator to qualify objects is `.`. The current schema is used to resolve unqulified objects. + +#### Keep action spooled files +When enabled, spooled files generated by an Action will not be deleted once the action is done. Otherwise, any spooled file generated by an Action will be cleared after it's done. + +#### Mapepire Java runtime (single mode) +Select which version of Java should be used to run Mapepire in Single mode. +- **Default**: use the default Java installation on the target LPAR (i.e. the Java installation used when running the unqualified `java` command). +- **Java XX**: use Java version XX, where XX can be 8, 11, 17 or 21. Make sure you select a version that is actually installed on the target LPAR. + +#### Connect to remote Mapepire server +When enabled, Code for IBM i will connect over HTTPS to a remote Mapepire server already running on the target IBM i instead uploading and running Mapepire in an SSH channel. + + + +#### Allow all certificates +When enabled, this setting allows validation of either self-signed certificates or certificates from a CA when connecting to a remote Mapepire server. + + +#### Remote Mapepire Server port +The TCP port number Code for IBM will use when connecting to a remote Mapepire server. Defaults to `8076`. \ No newline at end of file