JetBrains DataGrip set field value to now() - jetbrains-ide

I'm using DataGrip inside PhpStorm to access MySQL database. From time to time I need to update datetime fields with current time. For example TablePlus has the option to set field value to now() and on save it populates it with current datetime. It would be nice to have something similar on DataGrip as it is my primary database editor and it is really annoying setting time by hand.
Maybe someone has a solution for this?

There is no way to achieve this at the moment. Here are 2 related feature requests on our tracker, please follow and vote: 'add NOW to datepicker', 'using functions in table editor'

Related

Lotus View and Date values in column formula

Hi(sorry for possible dublicate).
I am trying to fix the performance issues in some of the legacy commercial databases which were badly designed in the past.
There are a lot of views in this databases and they are all containing the formulas #Now, #Today values in the view columns in the inner formulas, which are increasing Lotus Views open/refresh speed (as a notice, there is no dates manipulations in the view main selection formulas).
Information in this databases must to be always up to date and refreshed, so the solution with changing the view options (refresh time interval) are not good enough.
I am trying to create a global document (or to find similar solution), which will be updated one time at night with the server agent and will contains fields with year,month and day and trying to add this document as a subform to every document, so this fields with year e.t.c will be accessible in every document and so I could call them in my future column #-formulas and every day this field in this subform will be updated.
Is it really possible/right solution? How can I do that?
Can you please give some advice what is the best way to solve this?
p.s. I have already read a ton of articles about Lotus Views performance issues when using dates and mostly all of them are about creating a server agent, which will update the selection formulas one time per day... but in my variant - I am having a formulas in the columns.
Thank you.
UPDATED 03.03.2018:
Thanks to Knut Herrmann, I have understood that I need to use an agent to update column formulas and that this is possible.
But I am also trying to understand why the view will work faster after the view formula will be updated? Not quite understand this solution.
Why it has no need to update view index every time after one-time formula is updated at the night and why it's refreshing every time now when I am not using this approach?
Use the agent approach.
Change the column formula with NotesViewColumn's Formula property every night:
Dim column as NotesViewColumn
set column = ...
column.Formula = "your column formula"
The idea behind the agent is to avoid #Today in column formulas as this function causes the view to refresh every time it is called.
Example:
Every night at 2 a.m. change column formula (to show the number of days left)
(#Date(Deadline) - #Today) / 86400
to
(#Date(Deadline) - #Date(2018; 03; 04)) / 86400
This way you eliminate the "dangerous" function "#Today" by replacing it with the current date in formula.
Another option would be to add a field to all the documents using the NotesDocumentCollection StampAll() method in a scheduled agent. For example:
dim db as NotesDatabase
dim dc as NotesDocumentCollection
dim todayDate as new NotesDateTime("")
set dc = db.alldocuments() ' Or whatever selection of documents you want.
set todayDate.localtime = format(Now(),"mm/dd/yyyy")
call dc.stampall("TodayDate",todayDate)

SSRS: expand the ultimate group of values by default upon initial execution

Is there a way to get SSRS to expand the ultimate group of values by default upon initial execution, regardless of values?
My report looks like this:
Current scenario
What I want to achieve:
Ideal Scenario
I've searched for an answer without any success, I can't even find a similar question! Most require the current date values which can be done through the visibility settings and setting an expression to hide when not current date (or if not date then a specific value) - I get that. That's not what i'm asking, I simply want the ultimate values to be displayed when the report is initially rendered.
Any help is much appreciated. Thanks in advance!

How to get the Current Date & Time Automatically to a Date Time Field

I have created a date time field I made today's date as the default value, Then I added it to a page layout and created a page, But the current Date Time is not picking up from the system.
I dont want to give the user to select a Date Time instead it should populated automatically
Is there anyway to achieve this without writing code in code behind files?
This is very similar to this question I think
SO - How to get Date and current time from the Date/Time column in SharePoint Custom list
My answer there gives a few options such as using the built in Created field, using a calendar template, a JavaScript hack and a custom field type.
Guys, fake [Today] trick worked for us - but prob is we only got the date value not datetime.
Janis, is it possible to get date and time both from the fake [today] column trick? pls refer few articles on the same
Does [Today] work?
If you have language pack applied to SharePoint, then you must use localized "Today" string.

AutoIncrement in SQLite with Subsonic 3

This is probably a simple matter, but when I create a new object, the ID property starts off as 0 rather than null. As I understand it, SQLite takes/needs a value of null for the PK column to do the AutoIncrement.
So the short question is how to get the ID in the object to start life as null?
Thanks
cooter
Ok, here's what the solution seems to be. After you create the tables with PK's, open the table, right click on the left most column where the key image is and you can choose to edit Keys/Relationships. In that property screen you can set the column to auto-increment.
I also followed advice on this page.
This is all done using the most excellent tools from sqlite.phxsoftware.com/
-Cooter

Subsonic3 & GUIDs

I have a table with a PrimaryKey that is set as uniqueidentifier (GUID) and it's autopopulated using the newsequentialid() function from sql server 2008... When I insert a row manually, everything works as normal. But when I insert the record using the subsonic class and the repository the GUID column defaults to all zero's and the database will enter that value. I need it to NOT do this and use the default value of the column... anyone else able to get around this issue?
This was fixed in 2.0.2 for SQL 2005 - I'm wondering if there's an issue with SQL 2008. What version are you using? I'm thinking this might not have been covered in 3.x just yet.

Resources