Lowcoder Documentation
  • Lowcoder overview
    • The "Hello World" walk
  • 🆕Setup and run
    • Cloud & Private Cloud
    • Self-hosting
      • Google Cloud Platform
      • Easypanel
      • Heroku
      • Raspberry Pi
      • Access local database or API
      • Update MongoDB Versions
      • Lowcoder Version Update
      • Traefik loadbalancer
      • SMTP Server
      • Migration from Openblocks
    • Security
  • 🏨Workspaces & Teamwork
    • Workspaces
      • SAAS Mode
      • Enterprise Mode
    • Members and Groups
    • Permissions for Resources
    • OAuth
      • KeyCloak
      • Google
      • GitHub
      • Generic OAuth Provider
    • Query library
    • Lowcoder Marketplace
  • ✨Build Applications
    • Create a new App
      • App(s) Navigation
      • Modules
      • Version and Release Management
    • App Editor
      • Query & Editing Roundtrips
      • Bulk Editing
      • Keyboard shortcuts
      • Data selection & Javascript
      • Layers
      • Visual Components
        • Common Component Settings
        • Messages / Toast
        • Dashboard & Reporting
          • Table
          • Charts and graphs
            • Bar Chart
            • Line Chart
            • Pie Chart
            • Scatter Chart
            • CandleStick Chart
            • Funnel Chart
            • Gauge Chart
            • Graph Chart
            • Heatmap Chart
            • Radar Chart
            • Sankey Chart
            • Suburst Chart
            • Theme River Chart
            • Tree Chart
            • Treemap Chart
            • Mermaid Chart
          • Google Maps
        • Layout & Navigation
          • List View
          • Drawer
          • Modal
          • Navigation
          • Cascader
          • Tree / Tree Select
          • Link
          • Floating Button
          • Text
          • Step Control
          • Page Layout
          • Content Card
          • Tabbed Container
        • Data Collection & Forms
          • Form
          • Input Field Types
          • JSON Schema Form
        • Meeting & Collaboration
        • Project Management
        • Calendar & Scheduling
          • Calendar
          • Date & Date Range
          • Time & Time Range
        • Document & File Management
          • File upload
        • Item & Signature Handling
        • Multimedia & Animation
          • Image
        • Integration & Extension
        • Legacy & Deprecated
      • Option lists
      • Date handling
      • Use Markdown
    • App Interaction
      • Event handlers
    • Themes & Styling
      • Design an efficient and user-friendly form
      • Customize Styles
      • Component Styling Possibilities
    • Video Calls in Lowcoder
  • 🚀Connect your Data
    • Data source basics
      • Configure IP allowlists
    • Data sources in Lowcoder
      • APIs as Datasource
        • REST API
        • GraphQL
        • Google Sheets
      • SQL Databases
        • MySQL
        • MariaDB
        • Supabase
          • Supabase PostgreSQL
          • Supabase Assets API
          • Supabase RealTime
          • Supabase OAuth
        • PostgreSQL
        • Microsoft SQL Server
        • Oracle
      • NoSQL Databases
        • MongoDB
        • CouchDB
        • DynamoDB
      • InMemory Databases
        • Redis
      • File Storages
        • S3 File Storage
      • BigData & OLAP
        • Big Query
        • Snowflake
        • ClickHouse
        • Elasticsearch
      • Websocket Datasource
    • Query basics
      • Bind Query Data to Components
      • Query library
  • 🪄Workflows
    • n8n Integration
  • 💫Business Logic in Apps
    • Write JavaScript
      • JavaScript query
      • Temporary state
      • Transformers
      • Data responder
      • Built-in JS functions
  • 🙌Publish Apps
    • Share an App
    • Publish an App
    • Embed an App
      • Embed App in HTML Pages
      • Embed App in WordPress Pages
      • Embed Apps in React
      • Embed Apps in NEXT.JS
      • Native embed SDK
        • Build the SDK from Source
  • 🔥Lowcoder Extension
    • Opensource Contribution
      • Develop UI components for Apps
      • Develop Data Source Plugins
    • Use third-party libraries in Apps
      • Day.js Date handling
      • Import your own JavaScript Library
    • Custom component
    • Lowcoder Open REST API
  • Lowcoder for Enterprise
    • Custom branding
Powered by GitBook
On this page
  • 1) Create a new query
  • Input parameters
  • 2) Publish Queries
  • History versions of Queries
  • Version management of Data Queries
  • 3) Using Data Queries from Query Library
  • 4) Export and Import of Queries
  • Export of Data Queries
  • Import Queries
  • Permissions

Was this helpful?

  1. 🏨Workspaces & Teamwork

Query library

PreviousGeneric OAuth ProviderNextLowcoder Marketplace

Last updated 1 year ago

Was this helpful?

LogoLogo

More to try...

  • Lowcoder Website
  • Free Cloud Platform
  • Github
  • Discord

© Lowcoder Software LTD

The Query Library lets you store, reuse and share Data Queries for all Data Sources in a workspace. You can create and run queries in the Query Library, and call them from any Lowcoder app. This helps you to organize and pre-define important queries for colleagues that work with you on Apps for example.

The main function of the Query Library is to create and manage reusable Queries with Versioning.

1) Create a new query

  1. Click + New and select a data source. You can rename the query on demand.

Write code and click ▶ Run to get results. The results will display in the bottom pane of the window.

If available based on the Datasource, helping Metadata will get displayed on the right side to create Queries faster.

Input parameters

There are cases where you want to pass dynamic parameters to a query. Lowcoder supports that by introducing input configuration of a query.

Click Add in the Inputs tab in the right upper pane to add input parameters.

With the template notation {{}}, you can use the dynamic Input parameters in the Query. To test the Input Parameter, you can set test values that are directly used in the Query.

You can only reference variables instead of writing JavaScript code in {{}}.

To edit the name and description of the input variables, click ... and select Edit or directly click the title of the variable.

2) Publish Queries

When you finish writing a version of the query, you can publish it. Click ··· > Publish.

History versions of Queries

To view and restore the history versions of a Query, go to ··· > History version.

You can restore your current draft to a history version by selecting the target version from the history version list and clicking Restore this version. Click Exit to return to edit mode.

Version management of Data Queries

Queries may be updated on demand. You can make an adjustment to a query to a newer version and at the same time maintain the older version. Such version management is achievable in the query library. Click ··· in the top right corner to publish different versions of queries, and you can view and restore history versions.

The Query Library automatically suggests an Up-Versioning Format to choose from, (Minor to Major Version Change) so you can use semantic versioning (also known as SemVer) to name your version.

3) Using Data Queries from Query Library

In an app or module, Click + New in the Query editor in the bottom pane, then select Import from Query Library.

Select a query from the library from the dropdown list, choose your desired version and pass in the corresponding input parameters.

4) Export and Import of Queries

Export of Data Queries

You can export a Query as a JSON Definition file. This helps to use a Query across different Lowcocer installations for example, or simply as a Backup.

Be aware, that the connected Datasource of a Query may have different security credentials at different installation locations.

Import Queries

Based on the JSON Definition file, you can import Queries into Lowcoder. On the Query Library Overview Screen, you can use the Button "Import from File"

Permissions

Workspace Admin and members of Developers group have access to the Query Library and have read and write permissions to all queries in the library.

Overview of Data Queries and Action Buttons to create new Data Queries
You can create Data Queries for example as SQL Script for Databases
Using Input Parameters for dynamic Queries.
Queries need to get published to be usable in Apps
Semantiv Versioning to Data Queries
With "Export to JSON" you can backup a query or store it externally to use it in other Lowcoder Installations.
Import Data Queries from a JSON Definition File.