René's URL Explorer Experiment


Title: Interpret None as NULL in inserts · Issue #467 · datajoint/datajoint-python · GitHub

Open Graph Title: Interpret None as NULL in inserts · Issue #467 · datajoint/datajoint-python

X Title: Interpret None as NULL in inserts · Issue #467 · datajoint/datajoint-python

Description: In tables with NULL default values, insert behavior is inconsistent: If a dictionary-style insert is performed using a dictionary without a key corresponding to the default-null field, the operation proceeds. In the case of a dictionary-...

Open Graph Description: In tables with NULL default values, insert behavior is inconsistent: If a dictionary-style insert is performed using a dictionary without a key corresponding to the default-null field, the operatio...

X Description: In tables with NULL default values, insert behavior is inconsistent: If a dictionary-style insert is performed using a dictionary without a key corresponding to the default-null field, the operatio...

Opengraph URL: https://github.com/datajoint/datajoint-python/issues/467

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Interpret None as NULL in inserts","articleBody":"In tables with `NULL` default values, insert behavior is inconsistent:\r\n\r\nIf a dictionary-style insert is performed using a dictionary without a key corresponding to the default-null field, the operation proceeds. In the case of a dictionary-style insert where the default-null field is present and set to `None`, or in the case of a list-style insert with an appropriately given positional `None`,  the operation fails. \r\n\r\nHowever, on the fetch side, records are returned with `None` as a present and populated value.\r\n\r\n```\r\n\u003e\u003e\u003e print(OtherNull.definition)\r\n\r\n    otherid: integer\r\n    ---\r\n    otherthing=NULL: varchar(255)\r\n    \r\n\u003e\u003e\u003e OtherNull().insert1({'otherid': 1})\r\n\u003e\u003e\u003e OtherNull().insert1({'otherid': 2, 'otherthing': None})\r\nTraceback (most recent call last):\r\n  File \"\u003cconsole\u003e\", line 1, in \u003cmodule\u003e\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/datajoint/base_relation.py\", line 137, in insert1\r\n    self.insert((row,), **kwargs)\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/datajoint/base_relation.py\", line 278, in insert\r\n    itertools.chain.from_iterable((v for v in r['values'] if v is not None) for r in rows)))\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/datajoint/connection.py\", line 133, in query\r\n    cur.execute(query, args)\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/pymysql/cursors.py\", line 163, in execute\r\n    query = self.mogrify(query, args)\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/pymysql/cursors.py\", line 142, in mogrify\r\n    query = query % self._escape_args(args, conn)\r\nTypeError: not enough arguments for format string\r\n\u003e\u003e\u003e OtherNull().insert1((2, None,))\r\nTraceback (most recent call last):\r\n  File \"\u003cconsole\u003e\", line 1, in \u003cmodule\u003e\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/datajoint/base_relation.py\", line 137, in insert1\r\n    self.insert((row,), **kwargs)\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/datajoint/base_relation.py\", line 278, in insert\r\n    itertools.chain.from_iterable((v for v in r['values'] if v is not None) for r in rows)))\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/datajoint/connection.py\", line 133, in query\r\n    cur.execute(query, args)\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/pymysql/cursors.py\", line 163, in execute\r\n    query = self.mogrify(query, args)\r\n  File \"/Users/chris/Workspace/mlims-pipeline.ve/lib/python3.6/site-packages/pymysql/cursors.py\", line 142, in mogrify\r\n    query = query % self._escape_args(args, conn)\r\nTypeError: not enough arguments for format string\r\n```\r\non the fetch side, None is used as a substitute:\r\n```\r\n\u003e\u003e\u003e OtherNull()\r\n*otherid    otherthing    \r\n+---------+ +------------+\r\n1           None          \r\n (1 tuples)\r\n\r\n\u003e\u003e\u003e OtherNull().fetch()\r\narray([(1, None)], dtype=[('otherid', '\u003ci8'), ('otherthing', 'O')])\r\n\u003e\u003e\u003e OtherNull().fetch1()\r\nOrderedDict([('otherid', 1), ('otherthing', None)])\r\n```\r\n","author":{"url":"https://github.com/ixcat","@type":"Person","name":"ixcat"},"datePublished":"2018-04-25T02:37:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/467/datajoint-python/issues/467"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:71993e70-feae-053c-0176-022b820ad1b7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCB84:5105D:20E887A:2D4635E:6A4ED4C5
html-safe-nonce63b66f245768aa1d3e9169764e4d4ec179864257d4d2c83d8cddf03d5e87574c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjg0OjUxMDVEOjIwRTg4N0E6MkQ0NjM1RTo2QTRFRDRDNSIsInZpc2l0b3JfaWQiOiI5NjM2NDgwNzQzODY2OTEyNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac93997b2121066f813d8e1fe5306fad0a666efe35db5da9e0ec1729d5b98927d2
hovercard-subject-tagissue:317459776
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/datajoint/datajoint-python/467/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c98463855b67568c7eacc786ab7b50f88cc3aa7ebe63a38d53be077ad5a23ff4/datajoint/datajoint-python/issues/467
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c98463855b67568c7eacc786ab7b50f88cc3aa7ebe63a38d53be077ad5a23ff4/datajoint/datajoint-python/issues/467
og:image:altIn tables with NULL default values, insert behavior is inconsistent: If a dictionary-style insert is performed using a dictionary without a key corresponding to the default-null field, the operatio...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameixcat
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
turbo-cache-controlno-preview
go-importgithub.com/datajoint/datajoint-python git https://github.com/datajoint/datajoint-python.git
octolytics-dimension-user_id2375501
octolytics-dimension-user_logindatajoint
octolytics-dimension-repository_id5866704
octolytics-dimension-repository_nwodatajoint/datajoint-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id5866704
octolytics-dimension-repository_network_root_nwodatajoint/datajoint-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec37fe3e3f5f306900bd5b6bee97463f66c938b2c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/datajoint/datajoint-python/issues/467#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatajoint%2Fdatajoint-python%2Fissues%2F467
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatajoint%2Fdatajoint-python%2Fissues%2F467
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=datajoint%2Fdatajoint-python
Reloadhttps://github.com/datajoint/datajoint-python/issues/467
Reloadhttps://github.com/datajoint/datajoint-python/issues/467
Reloadhttps://github.com/datajoint/datajoint-python/issues/467
Please reload this pagehttps://github.com/datajoint/datajoint-python/issues/467
datajoint https://github.com/datajoint
datajoint-pythonhttps://github.com/datajoint/datajoint-python
Notifications https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Fork 96 https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Star 194 https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Code https://github.com/datajoint/datajoint-python
Issues 8 https://github.com/datajoint/datajoint-python/issues
Pull requests 4 https://github.com/datajoint/datajoint-python/pulls
Discussions https://github.com/datajoint/datajoint-python/discussions
Actions https://github.com/datajoint/datajoint-python/actions
Security and quality 0 https://github.com/datajoint/datajoint-python/security
Insights https://github.com/datajoint/datajoint-python/pulse
Code https://github.com/datajoint/datajoint-python
Issues https://github.com/datajoint/datajoint-python/issues
Pull requests https://github.com/datajoint/datajoint-python/pulls
Discussions https://github.com/datajoint/datajoint-python/discussions
Actions https://github.com/datajoint/datajoint-python/actions
Security and quality https://github.com/datajoint/datajoint-python/security
Insights https://github.com/datajoint/datajoint-python/pulse
Interpret None as NULL in insertshttps://github.com/datajoint/datajoint-python/issues/467#top
https://github.com/dimitri-yatsenko
enhancementIndicates new improvementshttps://github.com/datajoint/datajoint-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
Release 0.12https://github.com/datajoint/datajoint-python/milestone/6
https://github.com/ixcat
ixcathttps://github.com/ixcat
on Apr 25, 2018https://github.com/datajoint/datajoint-python/issues/467#issue-317459776
dimitri-yatsenkohttps://github.com/dimitri-yatsenko
enhancementIndicates new improvementshttps://github.com/datajoint/datajoint-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
Release 0.12https://github.com/datajoint/datajoint-python/milestone/6
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.