Jump to content

PostgreSQL Library


Recommended Posts

Posted (edited)

I put "everything PQ" into "PQ.lvlib"* and I was able to build the test PPL. When I added the existing PQ classes to PQ.lvlib I had to fix an error inside "Connection Record.vi" unbundle to get the DVR. Perhaps that was the root of the problem before, but creating "PQ.lvlib" let me fix the problem before building.

 

*thanks to @Francois Normandin for the lvlib hint

2025-01-15_11-19-53.png

Edited by ciozi137
Posted
1 hour ago, ciozi137 said:

When I added the existing PQ classes to PQ.lvlib I had to fix an error inside "Connection Record.vi" unbundle to get the DVR.

What was this error?  I can't seem to reproduce it.

Posted

Hi James, I can't seem to reproduce the error now either. Basically when I added the classes to "PQ.lvlib" LabVIEW had trouble finding the correct cluster element in this unbundle by name. I suspect the same problem was happening behind the scenes during the PPL build (?).

image.png

Posted

This is where the issue is.  The record of open connections has a type issue with DVR for whatever reason.  I've gotten the library working by making a packed library of all the commands that I need to use, and running diagram disables to remove all calls to Result Record.vi and Connection Record.vi (where the multi threading is handled).  I wonder if it is because the DVR section is not a type def or a strict type def.

Screenshot2025-01-14135940.png.df405c23bc73eb35a2a7a3fc086c882b.png

Posted
11 hours ago, Dpeter said:

I wonder if it is because the DVR section is not a type def or a strict type def.

Does making it a typedef prevent the problem?

  • 2 months later...
Posted

@drjdpowell I’ve tried to reproduce the error with the DVR but so far unsuccessful. 
 

when you have a chance can you review or comment latest pull request? Targets mostly libpq install, threading, etc. thanks

  • 1 year later...
Posted

@drjdpowell -- I'm not sure how much use this library gets, or if there's a desire to continue maintaining it.  I had a need to integrate this into a common reuse library to replace the .NET API (Npgsql).

As part of that integration process I had a couple of support features I found a need for:

  1. support for [null] data in both writing with parameters and in checking if a resulting element is null.
  2. support for pulling out the datatype of columns when reading results.
  3. pulling a result element back as a LV variant (rather than the explicit type) -- I believe the sqlite library supports this but postgresql did not.

I have a version that I've completed which includes these updates.  I'd be willing to integrate into the repo and make a pull request, but before going through that effort, I thought I'd check to see if that was of interest.  Let me know.

(I was going to log these things as issues/requests on bitbucket, but it appears that atlassian has migrated the "issues" interface to Jira, so that doesn't seem to work like it used to)

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.