question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

schema field in CreateDatabaseOptions does not allow string[].

See original GitHub issue

Environment details

  • @google-cloud/spanner version: 5.16.3

Details

The type of the schema field in CreateDatabaseOptions is string, but reading the tutorial and the internal logic, string[] should also be allowed. So I am wondering if I can define it as string | string[]? I’m assuming the following modification https://github.com/googleapis/nodejs-spanner/commit/00f9e7c05c7e474be4d9abadb1e18d244be52877

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
asthamohtacommented, Feb 24, 2022

Thanks a lot for this @winor30. Looks good to me. I am happy to merge this.

1reaction
asthamohtacommented, Feb 21, 2022

Thanks for bringing this up @winor30. Give me a couple of days to look into it and test it and I will get back to you 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

In mongoose how do I require a String field to not be null or ...
By making the required field conditional, this can be achieved: const mongoose = require('mongoose'); var userSchema = new mongoose.
Read more >
GraphQL schema basics - Apollo GraphQL Docs
Your GraphQL server uses a schema to describe the shape of your available data. This schema defines a hierarchy of types with fields...
Read more >
Documentation: 15: CREATE DATABASE - PostgreSQL
Description. CREATE DATABASE creates a new PostgreSQL database. To create a database, you must be a superuser or have the special CREATEDB privilege....
Read more >
Accept null for fieldtype auto and string* #401 - GitHub
Ignore null values. Index the rest of the document. Don't create a new schemafield. It can be created as soon as an acceptable...
Read more >
Schema / Field Types - Sanity.io
Typical uses of string fields include a title, name, and non-calculable numbers such as a postal code. There are also field options such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found