Comments (4)
Ok, I understand the "STRICT" and added that, but I don't understand your comments about "NOT NULL", "UNIQUE" and "PRIMARY". I just followed the sqlite tutorial/introduction, first time I use sqlite.
NAME is the unique key and never empty, all other fields could be theoretically empty (TTY and RemoteHost for sure, not sure about TIME, but I think the some utilities clear that in some cases, too).
About "TIME": no, time should not be automatically set or updated.
from lastlog2.
Ok, everything is fine then.
from lastlog2.
Actually thinking about it more and looking into the code. You save ''
as empty tty
and rhost
, for example:
Lines 184 to 186 in be609c4
You never use NULL
values AFAICS. The question is if you want/expect NULL
values in the columns in the database. They behave sort of differently than empty (''
) values. If not, I would do: tty TEXT NOT NULL DEFAULT ''
and similar.
from lastlog2.
I'm using NULL values, it was only because of the asprintf that this was mapped to empty strings.
I hope the code is now fine regarding sqlite3.
Thanks for the hints!
from lastlog2.
Related Issues (3)
- Use bind HOT 1
- static sqlite makes the library way too big HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lastlog2.